From 1a4927c5c54f737353323fd7bcd2045ee0985e1a Mon Sep 17 00:00:00 2001 From: Brian Gesiak Date: Tue, 27 May 2014 00:33:47 +0900 Subject: diff.c: rearrange xcalloc arguments xcalloc() takes two arguments: the number of elements and their size. diffstat_add() passes the arguments in reverse order, passing the size of a diffstat_file*, followed by the number of diffstat_file* to be allocated. Rearrange them so they are in the correct order. Signed-off-by: Brian Gesiak Signed-off-by: Junio C Hamano --- diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diff.c') diff --git a/diff.c b/diff.c index f72769a1c4..146521e194 100644 --- a/diff.c +++ b/diff.c @@ -1361,7 +1361,7 @@ static struct diffstat_file *diffstat_add(struct diffstat_t *diffstat, const char *name_b) { struct diffstat_file *x; - x = xcalloc(sizeof (*x), 1); + x = xcalloc(1, sizeof(*x)); ALLOC_GROW(diffstat->files, diffstat->nr + 1, diffstat->alloc); diffstat->files[diffstat->nr++] = x; if (name_b) { -- cgit v1.2.3