Return a negative error code on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// smpl
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret 0\|ret != 0\))
{ ... return ret; }
|
ret = 0
)
... when != ret = e1
when !=
The complate semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@ok exists@
identifier f,ret,i;
expression e;
constant c;
@@
// identify a function that returns a negative return value at least once.
f(...) {
... when any
(
return -c@i;
|
ret = -c@i;
...
On Sat, Apr 4, 2015 at 10:15 PM, Or Gerlitz gerlitz...@gmail.com wrote:
Indeed. No maintainer voice makes it kind of impossible for
discussions to converge. What happens over the last years is that when
there's no easy consensus on matter Y, everyone stops breathing and
wait to see what
On 04/05/15 14:06, Julia Lawall wrote:
Return a negative error code on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// smpl
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret 0\|ret != 0\))
{ ... return ret; }
|
ret
From: Roland Dreier rol...@kernel.org
Date: Sun, 5 Apr 2015 07:51:08 -0700
On Sat, Apr 4, 2015 at 10:15 PM, Or Gerlitz gerlitz...@gmail.com wrote:
Indeed. No maintainer voice makes it kind of impossible for
discussions to converge. What happens over the last years is that when
there's no easy