Subject: [PATCH 06/15] diff.c: rearrange xcalloc arguments

From: Brian Gesiak <[email-masked]>
Date: Tue, 27 May 2014 00:33:47 +0900

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. Rearrgange them so they are in the correct order.

Signed-off-by: Brian Gesiak <[email-masked]>
---
 diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diff.c b/diff.c
index 635dee2..a71dfde 100644
--- a/diff.c
+++ b/diff.c
@@ -1360,7 +1360,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));
 	if (diffstat->nr == diffstat->alloc) {
 		diffstat->alloc = alloc_nr(diffstat->alloc);
 		diffstat->files = xrealloc(diffstat->files,
-- 
2.0.0.rc1.543.gc8042da