lkml.org 
[lkml]   [2012]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/3] fix error return code
Date
These patches fix cases where the return code appears to be unintentially
nonnegative.

The complete semantic match that finds the problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier ret,l;
expression e1,e2,e3;
statement S;
@@

if (ret < 0)
{ ... return ret; }
... when != ret = e1
when forall
(
goto l;
|
return ...;
|
if (<+... ret = e3 ...+>) S
|
*if(...)
{
... when != ret = e2
* return ret;
}
)
// </smpl>



\
 
 \ /
  Last update: 2012-08-17 10:21    [W:0.046 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site