Merge branch 'jc/calloc-pathspec'

* jc/calloc-pathspec:
  ps_matched: xcalloc() takes nmemb and then element size
This commit is contained in:
Junio C Hamano
2015-08-26 15:45:33 -07:00
2 changed files with 2 additions and 2 deletions

View File

@ -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