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]
Date:   Mon, 10 Jul 2017 14:58:11 -0500
From:   "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To:     Oliver Neukum <oneukum@...e.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH] usb: isp1760: compress return logic into one line

Hi Oliver,

Quoting Oliver Neukum <oneukum@...e.com>:

> Am Sonntag, den 09.07.2017, 21:00 -0500 schrieb  Gustavo A. R. Silva :
>> Simplify return logic to avoid unnecessary variable assignment.
>>
>> This issue was detected using Coccinelle and the following
>> semantic patch:
>>
>
> Hi,
>
> I need to ask: Where is the improvement? The compiler does not bother
> and for the human reader you do not do anything obvious and you
> decreased grepability.
>

The declaration of local variable _retval_ was removed also.
So both, variable declaration and assignment removal are the improvements.

Regarding the greability, I think that depends on the context.

Thanks!
--
Gustavo A. R. Silva




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ