Re: [ANNOUNCE] GIT 1.5.4-rc3
- From
Jeff King <peff@peff.net>
- Date
- Jan 12, 2008, 18:09 UTC
- Message-ID
- <20080112180943.GA32732@coredump.intra.peff.net>
- In-Reply-To
- <alpine.LSU.1.00.0801121756400.8333@wbgn129.biozentrum.uni-wuerzburg.de>
On Sat, Jan 12, 2008 at 05:57:49PM +0100, Johannes Schindelin wrote:
Show 9 quoted lines
> > 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