Convert (hopefully) all comparisons to NULL
authorlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 21 Aug 2010 13:52:25 +0000 (13:52 +0000)
committerlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 21 Aug 2010 13:52:25 +0000 (13:52 +0000)
commit0d5e0c64e38b8d9c608f0f2c176c32be9f1532bb
tree9c217aa983ad44d303795c7deeca4da2a0769b5c
parent36223b1965148a874cbcfe8e89d6374ea655cc9b
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

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@51487 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/lib/efreet_desktop_command.c
src/lib/efreet_icon.c
src/lib/efreet_ini.c
src/lib/efreet_menu.c
src/tests/compare/efreet_alloc.c
src/tests/ef_data_dirs.c
src/tests/ef_icon_theme.c
src/tests/ef_locale.c
src/tests/ef_mime.c
src/tests/efreet_suite.c
src/tests/main.c