[PATCH v2] nisplus: Correct pwent parsing issue and resulting compilation error [BZ #23266]
DJ Delorie
dj@redhat.com
Mon Jun 18 20:40:00 GMT 2018
"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.
More information about the Libc-alpha
mailing list