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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got_send_pack() typo
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 28 Aug 2021 23:57:41 +0200

Download raw body.

Thread
  • Christian Weisgerber:

    got_send_pack() typo

    • Stefan Sperling:

      got_send_pack() typo

On Sat, Aug 28, 2021 at 11:46:46PM +0200, Christian Weisgerber wrote:
> Too much copy-paste, see below.  However, realloc_ids() with the
> correct arguments is called again in the loops that assign to
> our_ids/their_ids, and before the first assignment, so there is no
> ill effect.  Which makes me wonder whether we shouldn't just drop
> those initial realloc_ids() calls.

Yes, indeed. I agree with dropping them if you prefer.

Either change is ok by me.
 
> diff 27b75514d9b1c8e9f188ef9c483760647a8c1b72 /home/naddy/got
> blob - 110f62e7d18931540ea150d0169e082cd0227e48
> file + lib/send.c
> --- lib/send.c
> +++ lib/send.c
> @@ -557,7 +557,7 @@ got_send_pack(const char *remote_name, struct got_path
>  	err = realloc_ids(&our_ids, &nalloc_ours, 0);
>  	if (err)
>  		goto done;
> -	err = realloc_ids(&their_ids, &nalloc_ours, 0);
> +	err = realloc_ids(&their_ids, &nalloc_theirs, 0);
>  	if (err)
>  		goto done;
>  
> -- 
> Christian "naddy" Weisgerber                          naddy@mips.inka.de
> 
>