summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2014-05-26 15:33:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-05-27 21:02:03 (GMT)
commit1a4927c5c54f737353323fd7bcd2045ee0985e1a (patch)
tree5294362e7faed0383327fb34bbbd2e6506f15de9 /diff.c
parentf1064f6bc897fe35830c2ecee08f8dd27caf763c (diff)
downloadgit-1a4927c5c54f737353323fd7bcd2045ee0985e1a.zip
git-1a4927c5c54f737353323fd7bcd2045ee0985e1a.tar.gz
git-1a4927c5c54f737353323fd7bcd2045ee0985e1a.tar.bz2
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 <modocache@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index f72769a..146521e 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) {