diff options
Diffstat (limited to 'builtin-rm.c')
-rw-r--r-- | builtin-rm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin-rm.c b/builtin-rm.c index 5deb811719..92d205a715 100644 --- a/builtin-rm.c +++ b/builtin-rm.c @@ -43,11 +43,10 @@ static int remove_file(const char *name) static struct lock_file lock_file; -int cmd_rm(int argc, const char **argv, char **envp) +int cmd_rm(int argc, const char **argv, const char *prefix) { int i, newfd; int verbose = 0, show_only = 0, force = 0; - const char *prefix = setup_git_directory(); const char **pathspec; char *seen; @@ -90,8 +89,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]; |