]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git.c
use REALLOC_ARRAY for changing the allocation size of arrays
[thirdparty/git.git] / git.c
diff --git a/git.c b/git.c
index 210f1ae9d04dda4d16f9f072ef710bf630f6d52e..d5bb674814ffb4cbebd377a063afaeee4a29bd10 100644 (file)
--- a/git.c
+++ b/git.c
@@ -282,8 +282,7 @@ static int handle_alias(int *argcp, const char ***argv)
                                  "trace: alias expansion: %s =>",
                                  alias_command);
 
-               new_argv = xrealloc(new_argv, sizeof(char *) *
-                                   (count + *argcp));
+               REALLOC_ARRAY(new_argv, count + *argcp);
                /* insert after command name */
                memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp);