"GOT", but the "O" is a cute, smiling sun Index | Thread

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: convert got_pack filesize to off_t
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 28 Oct 2022 12:21:07 +0200

Download raw body.

On Thu, Oct 27, 2022 at 10:45:45PM +0200, Omar Polo wrote:
> 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:

Nice progress! Ok.

> 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;
>  
> 
>