Commit 64ab72383b1b73842575e2052cb542c0b5fd1345

Stefan Sperling 2020-03-18T16:13:42

remove pointless lseek() call in index_pack()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/libexec/got-index-pack/got-index-pack.c b/libexec/got-index-pack/got-index-pack.c
index ddea743..44c7e0d 100644
--- a/libexec/got-index-pack/got-index-pack.c
+++ b/libexec/got-index-pack/got-index-pack.c
@@ -554,12 +554,6 @@ index_pack(struct got_pack *pack, int idxfd, uint8_t *pack_hash,
 			nloose++;
 			update_packidx(&nlarge, &packidx, nobj, obj);
 		}
-
-		if (lseek(pack->fd, obj->off + obj->tslen + obj->len,
-		    SEEK_SET) == -1) {
-			err = got_error_from_errno("lseek");
-			goto done;
-		}
 	}
 	nvalid = nloose;