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-add.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin-add.c') diff --git a/builtin-add.c b/builtin-add.c index 2d25698173..3a73a173f7 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; -- cgit v1.2.3