Hi, On Sat, 12 Jan 2008, Jeff King wrote: > diff --git a/builtin-clean.c b/builtin-clean.c > index 6cad8ea..eb853a3 100644 > --- a/builtin-clean.c > +++ b/builtin-clean.c > @@ -90,7 +90,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix) > strbuf_init(&directory, 0); > > if (pathspec) > - seen = xmalloc(argc); > + seen = xmalloc(argc > 0 ? argc : 1); > > for (i = 0; i < dir.nr; i++) { > struct dir_entry *ent = dir.entries[i]; > @@ -125,7 +125,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix) > continue; > > if (pathspec) { > - memset(seen, 0, argc); > + memset(seen, 0, argc > 0 ? argc : 1); > matches = match_pathspec(pathspec, ent->name, ent->len, > baselen, seen); > } else { Would it not be better to guard the memset by an "if (argc)", and set "seen" to NULL by default? Ciao, Dscho - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html