Commit 8f2a2f4f1cea3d391fbf62e7507dd233cad10d99

Christian Weisgerber 2021-08-29T11:51:43

drop realloc_ids() initialization calls, one of which had a typo realloc_ids() is called again in the loops that assign to the ID arrays, before the first assignment. ok stsp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/lib/send.c b/lib/send.c
index 110f62e..cce652c 100644
--- a/lib/send.c
+++ b/lib/send.c
@@ -554,13 +554,6 @@ got_send_pack(const char *remote_name, struct got_pathlist_head *branch_names,
 		goto done;
 	}
 
-	err = realloc_ids(&our_ids, &nalloc_ours, 0);
-	if (err)
-		goto done;
-	err = realloc_ids(&their_ids, &nalloc_ours, 0);
-	if (err)
-		goto done;
-
 	if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, imsg_sendfds) == -1) {
 		err = got_error_from_errno("socketpair");
 		goto done;