summaryrefslogtreecommitdiff
path: root/builtin-rm.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-rm.c')
-rw-r--r--builtin-rm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-rm.c b/builtin-rm.c
index 5deb811719..bb810ba41a 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -90,8 +90,7 @@ int cmd_rm(int argc, const char **argv, char **envp)
seen = NULL;
for (i = 0; pathspec[i] ; i++)
/* nothing */;
- seen = xmalloc(i);
- memset(seen, 0, i);
+ seen = xcalloc(i, 1);
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = active_cache[i];