Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Possible unsafe use of strncat in sbin/sysctl/sysctl.c
On Aug 24, 2011, at 3:51 40AM, Jukka Ruohonen wrote:
> On Tue, Aug 23, 2011 at 09:58:53PM +0000, David Holland wrote:
>>> Some folks seems to (void)love it.
>>
>> Not that I know of...
>
> Me.
>
> Unlike others, I see the main benefit being related to human readers instead
> of static analyzers. A hint that the return value is ignored on purpose,
> which is often valuable, given that generally in C and/or system programming
> the de facto rule is to always evaluate the return value.
>
Precisely correct -- it's a statement to the *reader*. (There's a minor
benefit to the programmer who has to make a conscious decision "I don't
want to look at the return value", but habits, even the habit of typing
"(void)" every time, are strong.)
--Steve Bellovin, https://www.cs.columbia.edu/~smb
Home |
Main Index |
Thread Index |
Old Index