On Sat, Jan 12, 2008 at 05:57:49PM +0100, Johannes Schindelin wrote:
quoted
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?
I am not sure what you mean by "guard with if (argc)"; it needs to be
memset in either case (either with N slots, or with 1 if no argc). Seen
could not be NULL previously, but Rene's patch makes that possible.
-Peff