aboutsummaryrefslogtreecommitdiff
path: root/builtin-add.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-add.c')
-rw-r--r--builtin-add.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-add.c b/builtin-add.c
index 2d2569817..3a73a173f 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -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;