aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/evas/src/lib/canvas/evas_smart.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-21 13:52:25 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-21 13:52:25 +0000
commit5a8a8c90140aa18bde2c1696eb7d2da1c978e15e (patch)
treeb9d11055f743cd53a3895501ed9a6203062bbe60 /legacy/evas/src/lib/canvas/evas_smart.c
parentfix free shutdown of gl common part of gl engine -> gl pipes badbess. (diff)
downloadefl-5a8a8c90140aa18bde2c1696eb7d2da1c978e15e.tar.gz
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
Diffstat (limited to 'legacy/evas/src/lib/canvas/evas_smart.c')
-rw-r--r--legacy/evas/src/lib/canvas/evas_smart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_smart.c b/legacy/evas/src/lib/canvas/evas_smart.c
index 8aefc2115e..c1a9b042e5 100644
--- a/legacy/evas/src/lib/canvas/evas_smart.c
+++ b/legacy/evas/src/lib/canvas/evas_smart.c
@@ -400,19 +400,19 @@ _evas_smart_class_callbacks_create(Evas_Smart *s)
const Evas_Smart_Class *sc;
unsigned int n = 0;
- for (sc = s->smart_class; sc != NULL; sc = sc->parent)
+ for (sc = s->smart_class; sc; sc = sc->parent)
{
const Evas_Smart_Cb_Description *d;
- for (d = sc->callbacks; d && d->name != NULL; d++)
+ for (d = sc->callbacks; d && d->name; d++)
n++;
}
if (n == 0) return;
if (!evas_smart_cb_descriptions_resize(&s->callbacks, n)) return;
- for (n = 0, sc = s->smart_class; sc != NULL; sc = sc->parent)
+ for (n = 0, sc = s->smart_class; sc; sc = sc->parent)
{
const Evas_Smart_Cb_Description *d;
- for (d = sc->callbacks; d->name != NULL; d++)
+ for (d = sc->callbacks; d->name; d++)
s->callbacks.array[n++] = d;
}
evas_smart_cb_descriptions_fix(&s->callbacks);