Commit 22902794fc6f1f4d5bf6b01fdc20e783fb86af97

Stefan Sperling 2019-12-13T11:02:05

this lseek() call in read_dirlist() isn't needed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/lib/fileindex.c b/lib/fileindex.c
index 1ad99ac..46f05d1 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -856,9 +856,6 @@ read_dirlist(struct got_pathlist_head *dirlist, int dirfd, const char *path)
 	struct dirent *dep = NULL;
 	struct dirent *de = NULL;
 
-	if (lseek(dirfd, SEEK_SET, 0) == -1)
-		return got_error_from_errno("lseek");
-
 	dir = fdopendir(dirfd);
 	if (dir == NULL)
 		return got_error_from_errno2("fdopendir", path);