Commit Graph

29 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
Gustavo Sverzut Barbieri 0f80a2778c unscrew what lucas screwed with his patch-fu
SVN revision: 50819
2010-08-04 18:33:24 +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
Vincent Torri db570a48c1 fix opensolaris compilation
SVN revision: 44057
2009-11-30 18:08:33 +00:00
doursse a86946850d remove trailing spaces and add indent doc for vi
SVN revision: 34246
2008-04-11 19:06:18 +00:00
sebastid 95b180caa0 Don't use strlen to check if a string is empty.
SVN revision: 18270
2005-11-04 08:16:24 +00:00
tsauerbeck 155dc59a6f removed duplicatestring(), which was horribly broken and pretty useless
SVN revision: 14186
2005-04-13 20:27:03 +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 7037866a71 replace ishex() by isxdigits() calls
SVN revision: 14063
2005-04-01 15:15:38 +00:00
tsauerbeck 383755fc56 removed some dead code
SVN revision: 13921
2005-03-26 15:21:02 +00:00
tsauerbeck 63f3874903 better vim modelines for raster code
SVN revision: 11910
2004-10-19 16:50:27 +00:00
tsauerbeck 75d0539221 use EMBRYO_FLOAT_TO_CELL/CELL_TO_FLOAT macros in the sanity checks. not sure we need this anymore at all since we now use a union to do the casting.
SVN revision: 11888
2004-10-15 15:11:26 +00:00
tsauerbeck d833f56657 Implemented string concatenation.
For example, "pants""off" becomes "pantsoff".


SVN revision: 11831
2004-10-11 17:49:59 +00:00
Carsten Haitzler 7e672d79f8 ok that's it. fuck stdtypes.
SVN revision: 11588
2004-09-09 00:48:12 +00:00
Carsten Haitzler dcac490cff back to previous. no snprintf's. one of these broke embryo_cc.
SVN revision: 11037
2004-07-27 00:58:25 +00:00
vacuum 422dc28718 Fix my previous snprintf commit.
SVN revision: 11015
2004-07-25 14:52:24 +00:00
vacuum 5345cd6a90 sprintf -> snprintf
SVN revision: 11008
2004-07-25 04:40:16 +00:00
tsauerbeck 44a33d1f1d fixed some warnings
SVN revision: 10778
2004-07-11 09:50:42 +00:00
Carsten Haitzler b841fafc7f missed a *!
SVN revision: 10489
2004-06-10 08:52:35 +00:00
Carsten Haitzler e7b077d975 warning instead of abort
SVN revision: 10413
2004-06-02 02:29:44 +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 f14640499b need a swap!
SVN revision: 9457
2004-03-25 03:05:27 +00:00
Carsten Haitzler 6685ca7a70 portable portable damnit! need help cleaning this code! its horrid!
SVN revision: 9452
2004-03-25 02:07:28 +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