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)
commit16cec7c130d58624b466902c47fac85a3fc3091e
treefc74cae05113312dcb9f8efd8f93d46024c2501b
parent0e19251bb39d141f870820d457feafa9bba9118c
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/edje@51487 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
18 files changed:
src/bin/edje_cc_handlers.c
src/bin/edje_cc_parse.c
src/bin/edje_convert.c
src/bin/edje_convert_main.c
src/bin/edje_player.c
src/lib/edje_calc.c
src/lib/edje_convert.c
src/lib/edje_embryo.c
src/lib/edje_entry.c
src/lib/edje_external.c
src/lib/edje_load.c
src/lib/edje_lua.c
src/lib/edje_match.c
src/lib/edje_message_queue.c
src/lib/edje_private.h
src/lib/edje_program.c
src/lib/edje_text.c
src/lib/edje_util.c