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:	Thu, 21 Jul 2016 23:26:30 +0200
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	Wolfram Sang <wsa@...-dreams.de>
Cc:	Julia Lawall <julia.lawall@...6.fr>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org
Subject: Re: staging: ks7010: Delete unnecessary uses of the variable "retval"

>> Can you follow expectations around the proposed refactoring of any
>> function implementations?
> 
> I don't understand both questions. Maybe you need to give examples?

I suggest to try the following script (semantic patch for working with
the Coccinelle software) out on the discussed source files.


@checking_function_calls_directly@
identifier checker, retval, work;
expression list el;
statement is, es;
type rt;
@@
 rt checker(...)
 {
  <+...
-retval = work(el);
 if (
-    retval
+    work(el)
    )
    is
 else
    es
  ...+>
 }


Do you find such a source code transformation useful?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ