summaryrefslogtreecommitdiff
path: root/legacy/emotion/src
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/emotion/src
parent8b3511109441c22a2664665efe00892dc44fcf6c (diff)
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 '')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c2
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c2
-rw-r--r--legacy/emotion/src/modules/xine/emotion_xine_vo_out.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 33dced3421..579b6df3fd 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -161,7 +161,7 @@ _emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **
161 161
162 /* FIXME: Always look for a working backend. */ 162 /* FIXME: Always look for a working backend. */
163 retry: 163 retry:
164 if (name == NULL || index > 0) 164 if (!name || index > 0)
165 name = _backend_priority[index++]; 165 name = _backend_priority[index++];
166 166
167 plugin = eina_hash_find(_backends, name); 167 plugin = eina_hash_find(_backends, name);
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c
index b3764413ac..3411172b4e 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c
@@ -220,7 +220,7 @@ emotion_pipeline_cdda_track_count_get(void *video)
220 GstMessage *message; 220 GstMessage *message;
221 221
222 message = gst_bus_pop(bus); 222 message = gst_bus_pop(bus);
223 if (message == NULL) 223 if (!message)
224 /* All messages read, we're done */ 224 /* All messages read, we're done */
225 break; 225 break;
226 226
diff --git a/legacy/emotion/src/modules/xine/emotion_xine_vo_out.c b/legacy/emotion/src/modules/xine/emotion_xine_vo_out.c
index 1053d1842e..f8741bdf2a 100644
--- a/legacy/emotion/src/modules/xine/emotion_xine_vo_out.c
+++ b/legacy/emotion/src/modules/xine/emotion_xine_vo_out.c
@@ -395,12 +395,12 @@ _emotion_frame_format_update(vo_driver_t *vo_driver, vo_frame_t *vo_frame, uint3
395 break; 395 break;
396 } 396 }
397 if (((format == XINE_IMGFMT_YV12) 397 if (((format == XINE_IMGFMT_YV12)
398 && ((fr->vo_frame.base[0] == NULL) 398 && ((!fr->vo_frame.base[0])
399 || (fr->vo_frame.base[1] == NULL) 399 || (!fr->vo_frame.base[1])
400 || (fr->vo_frame.base[2] == NULL))) 400 || (!fr->vo_frame.base[2])))
401 || ((format == XINE_IMGFMT_YUY2) 401 || ((format == XINE_IMGFMT_YUY2)
402 && ((fr->vo_frame.base[0] == NULL) 402 && ((!fr->vo_frame.base[0])
403 || (fr->frame.bgra_data == NULL)))) 403 || (!fr->frame.bgra_data))))
404 { 404 {
405 _emotion_frame_data_free(fr); 405 _emotion_frame_data_free(fr);
406 } 406 }