Commit Diff


commit - e116395e102eeeb0790d44fe53b18fec50fbd09c552ae11fd79a0433eb693b25
commit + 8dff753aba8ff58e70bb6931a324ea5cdb1fc48cf529505d9149e4f2dba6b11b
blob - 66aad544794c72b2bd87b1e07053f28ee1b62475df60bda3260807eb15dd3c0c
blob + 719260492b67bd84d7aba6bbf46de2effb8a3af1604c67307f1f6b7a671d6021
--- lib/inflate.c	
+++ lib/inflate.c	
@@ -519,7 +519,7 @@ got_inflate_to_fd(size_t *outlen, FILE *infile,
 
 done:
 	if (err == NULL) {
-		if (lseek(outfd, SEEK_SET, 0) == -1)
+		if (lseek(outfd, 0L, SEEK_SET) == -1)
 			err = got_error_from_errno("lseek");
 	}
 	got_inflate_end(&zb);
blob - 56c845e9159b8af5bc434fd6704f7239f1803ad31285fd813b763b7d1c52872b
blob + b83b3895eea4e83622af8007e44594378319a978ee854f6ec68a9f53e69df306
--- lib/object_open_io.c	
+++ lib/object_open_io.c	
@@ -693,7 +693,7 @@ read_blob(uint8_t **outbuf, size_t *size, size_t *hdrl
 	if (err)
 		goto done;
 
-	if (lseek(infd, SEEK_SET, 0) == -1) {
+	if (lseek(infd, 0L, SEEK_SET) == -1) {
 		err = got_error_from_errno("lseek");
 		goto done;
 	}
@@ -762,7 +762,7 @@ open_blob(struct got_blob_object **blob, struct got_re
 		err = got_error_from_errno("ftruncate");
 		goto done;
 	}
-	if (lseek(outfd, SEEK_SET, 0) == -1) {
+	if (lseek(outfd, 0L, SEEK_SET) == -1) {
 		err = got_error_from_errno("lseek");
 		goto done;
 	}
blob - c4c7503fe12b21c86240e50665a7933d55786dcc92a9107a1f4d949a7c8829d2
blob + b15a8b5e15c59b2c737516a9207ca856a066d26f8dc89f17005c75ea5fc4caf0
--- lib/object_open_privsep.c	
+++ lib/object_open_privsep.c	
@@ -848,7 +848,7 @@ request_packed_blob(uint8_t **outbuf, size_t *size, si
 	if (err)
 		return err;
 
-	if (lseek(outfd, SEEK_SET, 0) == -1)
+	if (lseek(outfd, 0L, SEEK_SET) == -1)
 		err = got_error_from_errno("lseek");
 
 	return err;
@@ -894,7 +894,7 @@ request_blob(uint8_t **outbuf, size_t *size, size_t *h
 	if (err)
 		return err;
 
-	if (lseek(outfd, SEEK_SET, 0) == -1)
+	if (lseek(outfd, 0L, SEEK_SET) == -1)
 		return got_error_from_errno("lseek");
 
 	return err;
@@ -947,7 +947,7 @@ open_blob(struct got_blob_object **blob, struct got_re
 		err = got_error_from_errno("ftruncate");
 		goto done;
 	}
-	if (lseek(outfd, SEEK_SET, 0) == -1) {
+	if (lseek(outfd, 0L, SEEK_SET) == -1) {
 		err = got_error_from_errno("lseek");
 		goto done;
 	}
blob - 08bfe1001a24e0949ceab8d09b6c934add46080377533233dc7116495be033f7
blob + cf6855ec4d622a951ff18741e98a443d9118740a82452570e8b9983a3fac0071
--- lib/object_parse.c	
+++ lib/object_parse.c	
@@ -259,14 +259,14 @@ got_object_read_raw(uint8_t **outbuf, off_t *size, siz
 	memset(&csum, 0, sizeof(csum));
 	csum.output_ctx = &ctx;
 
-	if (lseek(infd, SEEK_SET, 0) == -1)
+	if (lseek(infd, 0L, SEEK_SET) == -1)
 		return got_error_from_errno("lseek");
 
 	err = got_object_read_header(&obj, infd);
 	if (err)
 		return err;
 
-	if (lseek(infd, SEEK_SET, 0) == -1)
+	if (lseek(infd, 0L, SEEK_SET) == -1)
 		return got_error_from_errno("lseek");
 
 	if (obj->size + obj->hdrlen <= max_in_mem_size) {
blob - 52aea231f780af0e74fde0abc67501db94a91a8caeeb9dc82229a1c3545e67ff
blob + b85fdd9fac2e7de32f4a6b02245e4f1ac83974afaf26785d8db50961ff7fbc81
--- libexec/got-read-blob/got-read-blob.c	
+++ libexec/got-read-blob/got-read-blob.c	
@@ -156,7 +156,7 @@ main(int argc, char *argv[])
 		if (err)
 			goto done;
 
-		if (lseek(fd, SEEK_SET, 0) == -1) {
+		if (lseek(fd, 0L, SEEK_SET) == -1) {
 			err = got_error_from_errno("lseek");
 			goto done;
 		}
blob - 780b4a00a2500628ba1b159fd00cc0cefb0abac0f786ff464a314187c8b016da
blob + 7cb534920a663e4d905c574b41b5be23bf612a354abee856bc54aca00f513daf
--- libexec/got-read-object/got-read-object.c	
+++ libexec/got-read-object/got-read-object.c	
@@ -69,7 +69,7 @@ send_raw_obj(struct imsgbuf *ibuf, struct got_object *
 	off_t size;
 	size_t hdrlen;
 
-	if (lseek(fd, SEEK_SET, 0) == -1) {
+	if (lseek(fd, 0L, SEEK_SET) == -1) {
 		err = got_error_from_errno("lseek");
 		goto done;
 	}