Commit Graph

12 Commits

Author SHA1 Message Date
Lucas De Marchi 5a8a8c9014 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 0a4617ae38 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Lucas De Marchi 33892c5fc4 Do not clobber type with var name
value => val, because value is a pre-defined type



SVN revision: 50063
2010-07-06 14:16:41 +00:00
Vincent Torri 190d1aea83 fix PATH_MAX detection
SVN revision: 45071
2010-01-12 22:44:25 +00:00
doursse a86946850d remove trailing spaces and add indent doc for vi
SVN revision: 34246
2008-04-11 19:06:18 +00:00
doursse 9817e365b1 fix gettimeofday on windows and add __UNUSED__ for unused parameters
SVN revision: 34245
2008-04-11 05:59:42 +00:00
tsauerbeck 0335fea64d properly include config.h
SVN revision: 14184
2005-04-13 20:01:23 +00:00
tsauerbeck 8b6e8a16c9 some more cleanup
SVN revision: 14177
2005-04-13 19:37:01 +00:00
tsauerbeck b8d6ef0f60 we don't have no fortify.h
SVN revision: 14176
2005-04-13 19:22:58 +00:00
tsauerbeck 383755fc56 removed some dead code
SVN revision: 13921
2005-03-26 15:21:02 +00:00
Carsten Haitzler 0d755cb255 formatting and all sorts of cleanup stuff... not anywhere near done or
perfect... :(


SVN revision: 9805
2004-04-20 03:50:11 +00:00
Carsten Haitzler 7b4b36e5d2 and E cvs did givbe birth to an Embryo! :)
SVN revision: 9445
2004-03-24 09:48:28 +00:00