diff options
| author | Junio C Hamano <gitster@pobox.com> | 2015-09-03 19:18:00 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2015-09-03 19:18:00 -0700 |
| commit | ae6ac8483b706b48882dcee96a42a4198744308a (patch) | |
| tree | fd9ce9fbce475de9411ad3c5f313e68a4785d0f0 /builtin/ls-files.c | |
| parent | 8136099a318a3c2c8883fba8dd3f570fc332ead6 (diff) | |
| parent | 8b54c23437834b36bbb5f6de2f577400385da770 (diff) | |
| download | git-ae6ac8483b706b48882dcee96a42a4198744308a.tar.gz | |
Merge branch 'jc/calloc-pathspec' into maint
Minor code cleanup.
* jc/calloc-pathspec:
ps_matched: xcalloc() takes nmemb and then element size
Diffstat (limited to 'builtin/ls-files.c')
| -rw-r--r-- | builtin/ls-files.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 6fa2205734..b6a7cb0c7c 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -516,7 +516,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) /* Treat unmatching pathspec elements as errors */ if (pathspec.nr && error_unmatch) - ps_matched = xcalloc(1, pathspec.nr); + ps_matched = xcalloc(pathspec.nr, 1); if ((dir.flags & DIR_SHOW_IGNORED) && !exc_given) die("ls-files --ignored needs some exclude pattern"); |
