From: Omar Polo Subject: Re: convert got_pack filesize to off_t To: Stefan Sperling Cc: gameoftrees@openbsd.org Date: Thu, 27 Oct 2022 22:45:45 +0200 Actually, there's no need for those XXX to exists. add_delta calls got_delta_open that already takes on off_t and does the right thing, so we can easily fix also this size_t implicit cast: diff /home/op/w/got commit - ad4cc36168576274131539e87b9007ef9b3c3725 path + /home/op/w/got blob - 36efe8c30ade7284694bc600951d79771cc42662 file + lib/pack.c --- lib/pack.c +++ lib/pack.c @@ -1033,7 +1033,7 @@ add_delta(struct got_delta_chain *deltas, off_t delta_ static const struct got_error * add_delta(struct got_delta_chain *deltas, off_t delta_offset, size_t tslen, - int delta_type, size_t delta_size, size_t delta_data_offset) + int delta_type, size_t delta_size, off_t delta_data_offset) { struct got_delta *delta; @@ -1076,7 +1076,7 @@ resolve_offset_delta(struct got_delta_chain *deltas, } err = add_delta(deltas, delta_offset, tslen, delta_type, delta_size, - delta_data_offset); /* XXX: off_t vs size_t! */ + delta_data_offset); if (err) return err; @@ -1151,7 +1151,7 @@ resolve_ref_delta(struct got_delta_chain *deltas, stru } err = add_delta(deltas, delta_offset, tslen, delta_type, delta_size, - delta_data_offset); /* XXX: off_t vs size_t */ + delta_data_offset); if (err) return err;