[PATCH 0/6] fix error return code

2014-11-22 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @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; ... when

[PATCH 0/6] fix error return code

2014-11-22 Thread Julia Lawall
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; ...

[PATCH 0/6] fix error return code

2012-08-05 Thread Julia Lawall
These patches fix cases where the return code appears to be unintentially 0. The complete semantic match that finds the problem is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier f; expression ret,e; constant C; @@ f(...) { <+... ( return -C; | ret = -C ... when != ret = e return

[PATCH 0/6] fix error return code

2012-08-05 Thread Julia Lawall
These patches fix cases where the return code appears to be unintentially 0. The complete semantic match that finds the problem is as follows: (http://coccinelle.lip6.fr/) // smpl @r@ identifier f; expression ret,e; constant C; @@ f(...) { +... ( return -C; | ret = -C ... when != ret = e return