]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-add.c
Substitute xmalloc()+memset(0) with xcalloc().
[thirdparty/git.git] / builtin-add.c
index 2d256981733345f4a430e11812b6851f0351aabd..3a73a173f729e0ca75e650779773316e8ae3fe98 100644 (file)
@@ -21,8 +21,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
 
        for (specs = 0; pathspec[specs];  specs++)
                /* nothing */;
-       seen = xmalloc(specs);
-       memset(seen, 0, specs);
+       seen = xcalloc(specs, 1);
 
        src = dst = dir->entries;
        i = dir->nr;