From 28f7581806479471093b0ec021871a4343874d13 Mon Sep 17 00:00:00 2001 From: Peter Eriksen Date: Tue, 25 Jul 2006 09:30:18 +0200 Subject: Substitute xmalloc()+memset(0) with xcalloc(). Signed-off-by: Peter Eriksen Signed-off-by: Junio C Hamano --- builtin-rm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin-rm.c') 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]; -- cgit v1.2.3