Convert (hopefully) all comparisons to NULL
authorlucas <lucas>
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)
commit201fb018da35d86a1d03fe1aa36d1a249895f762
treefc74cae05113312dcb9f8efd8f93d46024c2501b
parent0457f6d0b6cd5a5cc74e22ca805c671b31dc9fe3
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: http://svn.enlightenment.org/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