summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-09-16 18:56:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-18 16:13:42 (GMT)
commit2756ca4347cbda05b16954cd7f445c216b935e76 (patch)
tree70afb2d44557fd05bbc0707c190c6026ab6135fd /builtin/log.c
parent3ac22f82edec108986b2627fcd6f2a8039617a23 (diff)
downloadgit-2756ca4347cbda05b16954cd7f445c216b935e76.zip
git-2756ca4347cbda05b16954cd7f445c216b935e76.tar.gz
git-2756ca4347cbda05b16954cd7f445c216b935e76.tar.bz2
use REALLOC_ARRAY for changing the allocation size of arrays
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c
index e4d8122..7643396 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1440,7 +1440,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
continue;
nr++;
- list = xrealloc(list, nr * sizeof(list[0]));
+ REALLOC_ARRAY(list, nr);
list[nr - 1] = commit;
}
if (nr == 0)