Commit Graph

17 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 13d2d20efa Remove comparisons to NULL
Rather than using "== NULL" or "!= NULL", use expression or !expression where
possible.

Patch automatically generated by coccinelle from badnull.cocci and
badnull2.cocci



SVN revision: 51023
2010-08-11 20:35:26 +00:00
Lucas De Marchi 6b5d5eab73 Do not compare pointers to 0
SVN revision: 50973
2010-08-10 19:24:38 +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
Vincent Torri 9aec8f6722 fix warnings on 64 bits arch
patch by Albin Tonerre, modified by me so that vc++ is happy


SVN revision: 45428
2010-01-22 06:37:19 +00:00
Vincent Torri 190d1aea83 fix PATH_MAX detection
SVN revision: 45071
2010-01-12 22:44:25 +00:00
Cedric BAIL 41b0fb73a0 * embryo: Prevent use of unitialized data.
SVN revision: 44547
2009-12-18 17:40:13 +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 5b899a19e3 initialize correctly the stuctures
SVN revision: 34243
2008-04-11 05:29:33 +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 44a33d1f1d fixed some warnings
SVN revision: 10778
2004-07-11 09:50:42 +00:00
Carsten Haitzler 6567775653 notes...
SVN revision: 10240
2004-05-15 05:39:44 +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 74881aa1da selly's no more warnings...
SVN revision: 9672
2004-04-10 05:55:23 +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