lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 20 Feb 2015 09:40:53 -0500
From:	Jonathon Reinhart <jonathon.reinhart@...il.com>
To:	Alex Pilon <alp@...xpilon.ca>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] Allow specifying bridge port STP state by name rather
 than number.

Sorry, I only looked at your patch, and not the surrounding code. In that
case, I would probably stick with the existing style.

I'm just a casual passer-by, but I would like to hear others' opinion on this,
as I find exit(-1) to always be incorrect. The problem is that, per the man
page:

> The exit() function causes normal process termination and the value
> of status & 0377 is returned to the parent (see wait(2)).

So when -1 is passed to exit(), the parent will see it as 255. Why not
return a value that could be found in the source by grepping for it?

On Thu, Feb 19, 2015 at 11:57 PM, Alex Pilon <alp@...xpilon.ca> wrote:
> On Thu, Feb 19, 2015 at 09:00:23PM -0500, Jonathon Reinhart wrote:
>> Please don't pass -1 to exit().  It is outside the acceptable range (0 to 255)
>> of exit status values:
>>
>> https://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
>>
>> Most programs exit(1) when presented with invalid user input.
>
> I was being consistent with nearby code, and the dominant style.  But if
> that's the case, then there's a few hundred such mistakes that need
> correcting.  Should I fix all of them, and if so, should that be a
> single patch, or multiple?
>
> There's also only a few instances of EXIT_{SUCCESS,FAILURE}, so I took
> it wasn't the style to use that.
>
> Regards,
>
> Alex Pilon



-- 
Computers are incredibly fast, accurate and stupid. Human beings are
incredibly slow, inaccurate and brilliant. Together they are powerful
beyond imagination.
                                    A. Einstein
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ