"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
got_pack_parse_offset_delta: fix type argument
To:
gameoftrees@openbsd.org
Date:
Tue, 18 Oct 2022 10:41:55 +0200

Download raw body.

Thread
this is mostly cosmetic.  the tslen argument is always in the (1..9)
range (if i'm reading got_pack_parse_object_type_and_size correctly),
so an int is fine, but all the callers are using a size_t, so...

diff 535672d658a448620f24cd3a0bf61e9a6a98c94c 53b008c49b1c8bfa6ad4458ff2ae4febe4826435
commit - 535672d658a448620f24cd3a0bf61e9a6a98c94c
commit + 53b008c49b1c8bfa6ad4458ff2ae4febe4826435
blob - c3aa573d4997a2dc0cb67ccb37e2059a36d82e87
blob + 38d0cdc9b37e656d62eca1ed1def96ff6e7e2ef5
--- lib/got_lib_pack.h
+++ lib/got_lib_pack.h
@@ -41,7 +41,7 @@ const struct got_error *got_pack_parse_offset_delta(of
 const struct got_error *got_pack_close(struct got_pack *);
 
 const struct got_error *got_pack_parse_offset_delta(off_t *, size_t *,
-    struct got_pack *, off_t, int);
+    struct got_pack *, off_t, size_t);
 const struct got_error *got_pack_parse_ref_delta(struct got_object_id *,
     struct got_pack *, off_t, int);
 const struct got_error *got_pack_resolve_delta_chain(struct got_delta_chain *,
blob - 9ccb27ec5b1aa961b76fabb64c5f2e6094f9e14b
blob + 68b1fd0e80bf94dffd8e10520016a9003d60965c
--- lib/pack.c
+++ lib/pack.c
@@ -959,7 +959,7 @@ got_pack_parse_offset_delta(off_t *base_offset, size_t
 
 const struct got_error *
 got_pack_parse_offset_delta(off_t *base_offset, size_t *len,
-    struct got_pack *pack, off_t offset, int tslen)
+    struct got_pack *pack, off_t offset, size_t tslen)
 {
 	const struct got_error *err;
 	int64_t negoffset;