From: Jeff King Date: Sat, 12 Jan 2008 18:09:43 GMT Subject: Re: [ANNOUNCE] GIT 1.5.4-rc3 Message-ID: <20080112180943.GA32732@coredump.intra.peff.net> In-Reply-To: On Sat, Jan 12, 2008 at 05:57:49PM +0100, Johannes Schindelin wrote: > > 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