Re: [ANNOUNCE] GIT 1.5.4-rc3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux