1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-22 03:56:33 +02:00

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 <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brian Gesiak 2014-05-27 00:33:56 +09:00 committed by Junio C Hamano
parent da7a478bc0
commit 92e25b6b5b

View File

@ -1026,7 +1026,7 @@ static struct ref *get_refs_list(struct transport *transport, int for_push)
int transport_helper_init(struct transport *transport, const char *name)
{
struct helper_data *data = xcalloc(sizeof(*data), 1);
struct helper_data *data = xcalloc(1, sizeof(*data));
data->name = name;
if (getenv("GIT_TRANSPORT_HELPER_DEBUG"))