summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-26 22:45:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-26 22:45:34 (GMT)
commit88bd19be2fa4ae3343e89b73c103c3c51fe3044f (patch)
tree5384e94b4e7c93fd7304db7cc1d482006faf0f5e /builtin/checkout.c
parenta5315dd17dcace9a65fa616d2992d136961b3615 (diff)
parent8b54c23437834b36bbb5f6de2f577400385da770 (diff)
downloadgit-88bd19be2fa4ae3343e89b73c103c3c51fe3044f.zip
git-88bd19be2fa4ae3343e89b73c103c3c51fe3044f.tar.gz
git-88bd19be2fa4ae3343e89b73c103c3c51fe3044f.tar.bz2
Merge branch 'jc/calloc-pathspec'
* jc/calloc-pathspec: ps_matched: xcalloc() takes nmemb and then element size
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index e1403be..52d59eb 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -280,7 +280,7 @@ static int checkout_paths(const struct checkout_opts *opts,
if (opts->source_tree)
read_tree_some(opts->source_tree, &opts->pathspec);
- ps_matched = xcalloc(1, opts->pathspec.nr);
+ ps_matched = xcalloc(opts->pathspec.nr, 1);
/*
* Make sure all pathspecs participated in locating the paths