test-lib-functions: support "test_config -C <dir> ..."
[gitweb.git] / builtin / checkout.c
index f71844a23a9d4bda0664bec709648911bc0f2609..3b6e4999299484d30a41e0d787086a367ee70e5c 100644 (file)
@@ -282,7 +282,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