Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
mv: split submodule move preparation code out
[gitweb.git]
/
builtin
/
clean.c
diff --git
a/builtin/clean.c
b/builtin/clean.c
index 27701d222c78ed84691b65334a7909f90c589464..1032563e5fae880df9256c9eafaa96d60462ecd2 100644
(file)
--- a/
builtin/clean.c
+++ b/
builtin/clean.c
@@
-621,8
+621,7
@@
static int *list_and_choose(struct menu_opts *opts, struct menu_stuff *stuff)
nr += chosen[i];
}
- result = xmalloc(sizeof(int) * (nr + 1));
- memset(result, 0, sizeof(int) * (nr + 1));
+ result = xcalloc(nr + 1, sizeof(int));
for (i = 0; i < stuff->nr && j < nr; i++) {
if (chosen[i])
result[j++] = i;