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 v2] nisplus: Correct pwent parsing issue and resulting compilation error [BZ #23266]


"Maciej W. Rozycki" <macro@mips.com> writes:
>> +    if (len > 0)
>>        strncpy (first_unused, numstr, len);
>
>  Do you expect GCC to start complaining here sometime even if it cannot 
> statically prove that `len' can sometimes be zero, which seems the case 
> here?

I wouldn't expect gcc to complain here, no, but... some of the things
gcc *does* complain about have surprised me in the past.  So this is
just my paranoia asserting itself :-)

(and function calls used to be expensive, so my old optimizing tricks
are speaking up ;)

> But as you write, is it worth it?

I doubt it.  Just being thorough.


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