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

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
got_send_pack() typo
To:
gameoftrees@openbsd.org
Date:
Sat, 28 Aug 2021 23:46:46 +0200

Download raw body.

Thread
  • Christian Weisgerber:

    got_send_pack() typo

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.

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