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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1905142146560.2612@hadrien>
Date:   Tue, 14 May 2019 21:47:54 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Markus Elfring <Markus.Elfring@....de>
cc:     Gilles Muller <Gilles.Muller@...6.fr>,
        Julia Lawall <Julia.Lawall@...6.fr>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nicolas Palix <nicolas.palix@...g.fr>,
        Wen Yang <wen.yang99@....com.cn>,
        Coccinelle <cocci@...teme.lip6.fr>,
        LKML <linux-kernel@...r.kernel.org>,
        Yi Wang <wang.yi59@....com.cn>
Subject: Re: [PATCH 2/3] Coccinelle: pci_free_consistent: Reduce a bit of
 duplicate SmPL code



On Tue, 14 May 2019, Markus Elfring wrote:

> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Tue, 14 May 2019 17:18:24 +0200
>
> A return statement was specified with a known value for three branches
> of a SmPL disjunction.
> Reduce duplicate SmPL code there by using another disjunction for
> these return values.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>

NACK.  The goak is not to squeeze the most information into the fewest
number of characters.  The rule was fine as it was.

julia


> ---
>  scripts/coccinelle/free/pci_free_consistent.cocci | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/scripts/coccinelle/free/pci_free_consistent.cocci b/scripts/coccinelle/free/pci_free_consistent.cocci
> index 2056d6680cb8..45bc14ece151 100644
> --- a/scripts/coccinelle/free/pci_free_consistent.cocci
> +++ b/scripts/coccinelle/free/pci_free_consistent.cocci
> @@ -25,11 +25,11 @@ if (id == NULL || ...) { ... return ...; }
>      when != e = (T)id
>      when exists
>  (
> -return 0;
> -|
> -return 1;
> -|
> -return id;
> + return
> +(0
> +|1
> +|id
> +);
>  |
>  return@p2 ...;
>  )
> --
> 2.21.0
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ