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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YxIyRDzQt5cN7Lbn@lunn.ch>
Date:   Fri, 2 Sep 2022 18:41:40 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Casper Andersson <casper.casan@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Steen Hegelund <Steen.Hegelund@...rochip.com>,
        UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org,
        Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH net-next] net: sparx5: fix return values to correctly use
 bool

On Fri, Sep 02, 2022 at 10:45:21AM +0200, Casper Andersson wrote:
> Function was declared to return bool, but used error return strategy (0
> for success, else error). Now correctly uses bool to indicate whether
> the entry was found or not.

I think it would be better to actually return an int. < 0 error, 0 =
not foumd > 1 found. You can then return ETIMEDOUT etc.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ