summaryrefslogtreecommitdiff
path: root/builtin-rm.c
diff options
context:
space:
mode:
authorPeter Eriksen <s022018@student.dtu.dk>2006-07-25 07:30:18 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-25 21:08:09 (GMT)
commit28f7581806479471093b0ec021871a4343874d13 (patch)
tree4d87706c1a09a113d1e0d887560b1b5b044cc24a /builtin-rm.c
parent143c89b00348759d2768003d57e0f506d281dc61 (diff)
downloadgit-28f7581806479471093b0ec021871a4343874d13.zip
git-28f7581806479471093b0ec021871a4343874d13.tar.gz
git-28f7581806479471093b0ec021871a4343874d13.tar.bz2
Substitute xmalloc()+memset(0) with xcalloc().
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
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 5deb811..bb810ba 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];