This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve generic strstr performance.


On Tue, May 12, 2015 at 02:07:10PM -0700, Roland McGrath wrote:
> > +  if (!needle[1])
> 
> No implicit Boolean coercion:
> 	if (needle[1] == '\0')
> 
> > +          if (needle[2] == '\000')
> 
> Just write '\0' when you are talking about the terminator.  Use '\000' only
> when it's in a context where literal octal values make real sense.
> 
> (I'm not reviewing the substance of your change.)

Ok, will change that before I would commit it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]