Commit Graph

5 Commits

Author SHA1 Message Date
Lucas De Marchi f2638e50f3 Revert and re-apply badnull patch
Revert previous patch generated by badnull.cocci script, and apply the new one.
The main difference is that assert and assert-like functions are not touched
anymore.




SVN revision: 51650
2010-08-26 01:34:13 +00:00
Lucas De Marchi 2959caf18c Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Lucas De Marchi 3b31ee50e7 Apply badzero.cocci, badnull.cocci and badnull2.cocci
Since badzero.cocci depends on coccinelle knowledge about a variable being a pointer
and about a function returning a pointer, maybe there are false negatives.



SVN revision: 51092
2010-08-13 17:04:13 +00:00
Mike Frysinger 3b2279b158 eat trailing whitespace
SVN revision: 45271
2010-01-17 20:56:24 +00:00
Kim Woelders 614ce8bd72 tools/e16menuedit2 -> e16menuedit.
SVN revision: 35618
2008-08-23 08:09:04 +00:00