From: Brian Gesiak Date: Mon, 26 May 2014 15:33:56 +0000 (+0900) Subject: transport-helper.c: rearrange xcalloc arguments X-Git-Tag: v2.0.3~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92e25b6b5b66320e73ace921f3db816ef4243d1b;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/transport-helper.c b/transport-helper.c index b468e4f88e..b9ba0416b2 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -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"))