Skip to content

Commit 92e25b6

Browse files
modocachegitster
authored andcommitted
transport-helper.c: rearrange xcalloc arguments
xcalloc() takes two arguments: the number of elements and their size. transport_helper_init passes the arguments in reverse order, passing the size of a helper_data*, followed by the number to allocate. Rearrange them so they are in the correct order. Signed-off-by: Brian Gesiak <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent da7a478 commit 92e25b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transport-helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ static struct ref *get_refs_list(struct transport *transport, int for_push)
10261026

10271027
int transport_helper_init(struct transport *transport, const char *name)
10281028
{
1029-
struct helper_data *data = xcalloc(sizeof(*data), 1);
1029+
struct helper_data *data = xcalloc(1, sizeof(*data));
10301030
data->name = name;
10311031

10321032
if (getenv("GIT_TRANSPORT_HELPER_DEBUG"))

0 commit comments

Comments
 (0)