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)
commitfc37aa5c35b45ff156a685d1a28e262c9fe3a22d
tree2c2ff4d1f31b12572d6d52b4c1a0ba26708ab6a9
parentb99d0ff8633762bc3a1d1071ceae6f21a135677f
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/evas@51487 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
23 files changed:
src/lib/cache/evas_cache_engine_image.c
src/lib/cache/evas_cache_image.c
src/lib/canvas/evas_clip.c
src/lib/canvas/evas_data.c
src/lib/canvas/evas_object_box.c
src/lib/canvas/evas_object_intercept.c
src/lib/canvas/evas_object_smart.c
src/lib/canvas/evas_object_textblock.c
src/lib/canvas/evas_smart.c
src/lib/cserve/evas_cs_client.c
src/lib/engines/common/evas_font_load.c
src/lib/engines/common/evas_image_main.c
src/lib/engines/common/evas_pipe.c
src/lib/engines/common/evas_tiler.c
src/lib/file/evas_module.c
src/modules/engines/direct3d/evas_engine.c
src/modules/engines/software_16_x11/evas_x_buffer.c
src/modules/engines/software_8_x11/evas_x_buffer.c
src/modules/engines/software_x11/evas_xcb_buffer.c
src/modules/engines/software_x11/evas_xlib_buffer.c
src/modules/engines/xrender_x11/evas_engine_xcb_ximage.c
src/modules/loaders/tiff/evas_image_load_tiff.c
src/modules/savers/png/evas_image_save_png.c