From 2e404bbd0ead787e5a56901dbeb5f11994bfa3d4 Mon Sep 17 00:00:00 2001 From: Hyoyoung Chang Date: Mon, 13 Sep 2010 13:26:55 +0900 Subject: [PATCH] [efl-upgrade] --- src/lib/cache/evas_cache_engine_image.c | 12 +++++------ src/lib/cache/evas_cache_image.c | 14 ++++++------- src/lib/canvas/evas_clip.c | 2 +- src/lib/canvas/evas_data.c | 2 +- src/lib/canvas/evas_object_box.c | 6 +++--- src/lib/canvas/evas_object_intercept.c | 24 +++++++++++----------- src/lib/canvas/evas_object_smart.c | 2 +- src/lib/canvas/evas_object_textblock.c | 4 ++-- src/lib/canvas/evas_smart.c | 8 ++++---- src/lib/cserve/evas_cs_client.c | 10 ++++----- src/lib/engines/common/evas_font_load.c | 4 ++-- src/lib/engines/common/evas_image_main.c | 6 +++--- src/lib/engines/common/evas_pipe.c | 4 ++-- src/lib/engines/common/evas_tiler.c | 12 +++++------ src/lib/file/evas_module.c | 8 ++++---- src/modules/engines/direct3d/evas_engine.c | 12 +++++------ .../engines/software_16_x11/evas_x_buffer.c | 2 +- src/modules/engines/software_8_x11/evas_x_buffer.c | 2 +- src/modules/engines/software_x11/evas_xcb_buffer.c | 2 +- .../engines/software_x11/evas_xlib_buffer.c | 2 +- .../engines/xrender_x11/evas_engine_xcb_ximage.c | 2 +- src/modules/loaders/tiff/evas_image_load_tiff.c | 2 +- src/modules/savers/png/evas_image_save_png.c | 2 +- 23 files changed, 72 insertions(+), 72 deletions(-) diff --git a/src/lib/cache/evas_cache_engine_image.c b/src/lib/cache/evas_cache_engine_image.c index 829380d..a629d42 100644 --- a/src/lib/cache/evas_cache_engine_image.c +++ b/src/lib/cache/evas_cache_engine_image.c @@ -144,7 +144,7 @@ _evas_cache_engine_image_dealloc(Evas_Cache_Engine_Image *cache, Engine_Image_En EAPI int evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache) { - assert(cache != NULL); + assert(!!cache); return cache->usage; } @@ -152,7 +152,7 @@ evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache) EAPI int evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache) { - assert(cache != NULL); + assert(!!cache); return cache->limit; } @@ -160,7 +160,7 @@ evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache) EAPI void evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit) { - assert(cache != NULL); + assert(!!cache); cache->limit = limit; } @@ -247,7 +247,7 @@ _evas_cache_engine_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ co EAPI void evas_cache_engine_image_flush(Evas_Cache_Engine_Image *cache) { - assert(cache != NULL); + assert(!!cache); while ((cache->lru) && (cache->limit < cache->usage)) { @@ -264,7 +264,7 @@ evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache) Engine_Image_Entry *eim; Eina_List *delete_list = NULL; - assert(cache != NULL); + assert(!!cache); if (cache->func.debug) cache->func.debug("shutdown-engine", NULL); @@ -303,7 +303,7 @@ evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, Image_Entry *im; const char *ekey; - assert(cache != NULL); + assert(!!cache); *error = EVAS_LOAD_ERROR_NONE; diff --git a/src/lib/cache/evas_cache_image.c b/src/lib/cache/evas_cache_image.c index a7d7579..117815d 100644 --- a/src/lib/cache/evas_cache_image.c +++ b/src/lib/cache/evas_cache_image.c @@ -74,7 +74,7 @@ _evas_cache_image_make_activ(Evas_Cache_Image *cache, { /* FIXME: Handle case when image is being processed anyway and don't do a double decode. */ im->cache_key = key; - if (key != NULL) + if (key) { im->flags.cached = 1; im->flags.activ = 1; @@ -510,7 +510,7 @@ _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target) } } - if (ie->targets == NULL && ie->preload && !ie->flags.pending) + if (!ie->targets && ie->preload && !ie->flags.pending) { ie->cache->preload = eina_list_remove(ie->cache->preload, ie); ie->cache->pending = eina_list_append(ie->cache->pending, ie); @@ -525,7 +525,7 @@ _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target) EAPI int evas_cache_image_usage_get(Evas_Cache_Image *cache) { - assert(cache != NULL); + assert(!!cache); return cache->usage; } @@ -533,7 +533,7 @@ evas_cache_image_usage_get(Evas_Cache_Image *cache) EAPI int evas_cache_image_get(Evas_Cache_Image *cache) { - assert(cache != NULL); + assert(!!cache); return cache->limit; } @@ -541,7 +541,7 @@ evas_cache_image_get(Evas_Cache_Image *cache) EAPI void evas_cache_image_set(Evas_Cache_Image *cache, int limit) { - assert(cache != NULL); + assert(!!cache); #ifdef EVAS_FRAME_QUEUING LKL(cache->lock); #endif @@ -698,7 +698,7 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char * size_t key_length; struct stat st; - assert(cache != NULL); + assert(!!cache); if ((!file) || ((!file) && (!key))) { @@ -1436,7 +1436,7 @@ evas_cache_image_preload_cancel(Image_Entry *im, const void *target) assert(im); assert(im->cache); - if (target == NULL) return; + if (!target) return; _evas_cache_image_entry_preload_remove(im, target); #else (void)im; diff --git a/src/lib/canvas/evas_clip.c b/src/lib/canvas/evas_clip.c index 1f9ce4d..6623aa7 100644 --- a/src/lib/canvas/evas_clip.c +++ b/src/lib/canvas/evas_clip.c @@ -133,7 +133,7 @@ evas_object_clip_set(Evas_Object *obj, Evas_Object *clip) obj->cur.clipper = NULL; } /* clip me */ - if ((clip->clip.clipees == NULL) && (clip->cur.visible)) + if ((!clip->clip.clipees) && (clip->cur.visible)) { /* Basically it just went invisible */ clip->changed = 1; diff --git a/src/lib/canvas/evas_data.c b/src/lib/canvas/evas_data.c index a3ddc7f..4aaf475 100644 --- a/src/lib/canvas/evas_data.c +++ b/src/lib/canvas/evas_data.c @@ -48,7 +48,7 @@ evas_object_data_set(Evas_Object *obj, const char *key, const void *data) if (!key) return; evas_object_data_del(obj, key); - if (data == NULL) return; + if (!data) return; node = malloc(sizeof(Evas_Data_Node) + strlen(key) + 1); node->key = (char *)node + sizeof(Evas_Data_Node); strcpy(node->key, key); diff --git a/src/lib/canvas/evas_object_box.c b/src/lib/canvas/evas_object_box.c index c1923cd..ede16ea 100644 --- a/src/lib/canvas/evas_object_box.c +++ b/src/lib/canvas/evas_object_box.c @@ -323,7 +323,7 @@ _evas_object_box_insert_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, E return new_opt; } - for (l = priv->children, i = 0; l != NULL; l = l->next, i++) + for (l = priv->children, i = 0; l; l = l->next, i++) { Evas_Object_Box_Option *opt = l->data; @@ -1451,7 +1451,7 @@ _evas_object_box_layout_flow_horizontal_row_info_collect(Evas_Object_Box_Data *p int off_y = 0, max_h = 0, n_rows = 0; Eina_List *l; - for (i = 0, l = priv->children; l != NULL; i++, l = l->next) + for (i = 0, l = priv->children; l; i++, l = l->next) { Evas_Object_Box_Option *opt = l->data; int padding_l, padding_r, padding_t, padding_b; @@ -1666,7 +1666,7 @@ _evas_object_box_layout_flow_vertical_col_info_collect(Evas_Object_Box_Data *pri int off_x = 0, max_w = 0, n_cols = 0; Eina_List *l; - for (i = 0, l = priv->children; l != NULL; i++, l = l->next) + for (i = 0, l = priv->children; l; i++, l = l->next) { Evas_Object_Box_Option *opt = l->data; int padding_l, padding_r, padding_t, padding_b; diff --git a/src/lib/canvas/evas_object_intercept.c b/src/lib/canvas/evas_object_intercept.c index 3387685..0e94f74 100644 --- a/src/lib/canvas/evas_object_intercept.c +++ b/src/lib/canvas/evas_object_intercept.c @@ -54,7 +54,7 @@ evas_object_intercept_call_show(Evas_Object *obj) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->show.func) != NULL); + ret = !!(obj->interceptors->show.func); if (obj->interceptors->show.func) obj->interceptors->show.func(obj->interceptors->show.data, obj); obj->intercepted = 0; @@ -70,7 +70,7 @@ evas_object_intercept_call_hide(Evas_Object *obj) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->hide.func) != NULL); + ret = !!(obj->interceptors->hide.func); if (obj->interceptors->hide.func) obj->interceptors->hide.func(obj->interceptors->hide.data, obj); obj->intercepted = 0; @@ -86,7 +86,7 @@ evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->move.func) != NULL); + ret = !!(obj->interceptors->move.func); if (obj->interceptors->move.func) obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y); obj->intercepted = 0; @@ -102,7 +102,7 @@ evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->resize.func) != NULL); + ret = !!(obj->interceptors->resize.func); if (obj->interceptors->resize.func) obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h); obj->intercepted = 0; @@ -118,7 +118,7 @@ evas_object_intercept_call_raise(Evas_Object *obj) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->raise.func) != NULL); + ret = !!(obj->interceptors->raise.func); if (obj->interceptors->raise.func) obj->interceptors->raise.func(obj->interceptors->raise.data, obj); obj->intercepted = 0; @@ -134,7 +134,7 @@ evas_object_intercept_call_lower(Evas_Object *obj) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->lower.func) != NULL); + ret = !!(obj->interceptors->lower.func); if (obj->interceptors->lower.func) obj->interceptors->lower.func(obj->interceptors->lower.data, obj); obj->intercepted = 0; @@ -150,7 +150,7 @@ evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->stack_above.func) != NULL); + ret = !!(obj->interceptors->stack_above.func); if (obj->interceptors->stack_above.func) obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above); obj->intercepted = 0; @@ -166,7 +166,7 @@ evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->stack_below.func) != NULL); + ret = !!(obj->interceptors->stack_below.func); if (obj->interceptors->stack_below.func) obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below); obj->intercepted = 0; @@ -182,7 +182,7 @@ evas_object_intercept_call_layer_set(Evas_Object *obj, int l) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->layer_set.func) != NULL); + ret = !!(obj->interceptors->layer_set.func); if (obj->interceptors->layer_set.func) obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l); obj->intercepted = 0; @@ -198,7 +198,7 @@ evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->color_set.func) != NULL); + ret = !!(obj->interceptors->color_set.func); if (obj->interceptors->color_set.func) obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a); obj->intercepted = 0; @@ -214,7 +214,7 @@ evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->clip_set.func) != NULL); + ret = !!(obj->interceptors->clip_set.func); if (obj->interceptors->clip_set.func) obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip); obj->intercepted = 0; @@ -230,7 +230,7 @@ evas_object_intercept_call_clip_unset(Evas_Object *obj) if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = 1; - ret = ((obj->interceptors->clip_unset.func) != NULL); + ret = !!(obj->interceptors->clip_unset.func); if (obj->interceptors->clip_unset.func) obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj); obj->intercepted = 0; diff --git a/src/lib/canvas/evas_object_smart.c b/src/lib/canvas/evas_object_smart.c index cfeddd9..55000aa 100644 --- a/src/lib/canvas/evas_object_smart.c +++ b/src/lib/canvas/evas_object_smart.c @@ -559,7 +559,7 @@ evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_ return 1; } - for (count = 0, d = descriptions; d->name != NULL; d++) + for (count = 0, d = descriptions; d->name; d++) count++; evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, count); diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index f65c997..4b617e2 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -2611,7 +2611,7 @@ skip: _layout_walk_back_to_item_word_redo(c, it); goto end; } - if (c->ln->items != NULL) + if (c->ln->items) { white_stripped = _layout_item_abort(c, fmt, it); empty_item = 1; @@ -2660,7 +2660,7 @@ skip: goto end; } } - if (c->ln->items != NULL) + if (c->ln->items) { white_stripped = _layout_item_abort(c, fmt, it); empty_item = 1; diff --git a/src/lib/canvas/evas_smart.c b/src/lib/canvas/evas_smart.c index 8aefc21..c1a9b04 100644 --- a/src/lib/canvas/evas_smart.c +++ b/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); diff --git a/src/lib/cserve/evas_cs_client.c b/src/lib/cserve/evas_cs_client.c index cb42e8b..654955e 100644 --- a/src/lib/cserve/evas_cs_client.c +++ b/src/lib/cserve/evas_cs_client.c @@ -336,7 +336,7 @@ evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_ ie->data1 = rep->handle; } if (rep) free(rep); - if (ie->data1 == NULL) return 0; + if (!ie->data1) return 0; ie->connect_num = connect_num; if (cserve) ie->server_id = cserve->server_id; @@ -353,7 +353,7 @@ evas_cserve_image_data_load(Image_Entry *ie) if (csrve_init > 0) server_reinit(); else return 0; if (!cserve) return 0; - if (ie->data1 == NULL) return 0; + if (!ie->data1) return 0; if (cserve->server_id != ie->server_id) { ie->data1 = NULL; @@ -391,7 +391,7 @@ evas_cserve_image_free(Image_Entry *ie) if (csrve_init > 0) server_reinit(); else return; if (!cserve) return; - if (ie->data1 == NULL) return; + if (!ie->data1) return; memset(&msg, 0, sizeof(msg)); msg.handle = ie->data1; msg.server_id = cserve->server_id; @@ -416,7 +416,7 @@ evas_cserve_image_unload(Image_Entry *ie) if (csrve_init > 0) server_reinit(); else return; if (!cserve) return; - if (ie->data1 == NULL) return; + if (!ie->data1) return; if (ie->connect_num != connect_num) return; memset(&msg, 0, sizeof(msg)); msg.handle = ie->data1; @@ -438,7 +438,7 @@ evas_cserve_image_useless(Image_Entry *ie) if (csrve_init > 0) server_reinit(); else return; if (!cserve) return; - if (ie->data1 == NULL) return; + if (!ie->data1) return; if (ie->connect_num != connect_num) return; memset(&msg, 0, sizeof(msg)); msg.handle = ie->data1; diff --git a/src/lib/engines/common/evas_font_load.c b/src/lib/engines/common/evas_font_load.c index 4acbc9f..8ea3188 100644 --- a/src/lib/engines/common/evas_font_load.c +++ b/src/lib/engines/common/evas_font_load.c @@ -131,7 +131,7 @@ evas_common_font_source_memory_load(const char *name, const void *data, int data int error; RGBA_Font_Source *fs; - assert(name != NULL); + assert(!!name); fs = calloc(1, sizeof(RGBA_Font_Source) + data_size); if (!fs) return NULL; @@ -164,7 +164,7 @@ evas_common_font_source_load(const char *name) { RGBA_Font_Source *fs; - assert(name != NULL); + assert(!!name); fs = calloc(1, sizeof(RGBA_Font_Source)); if (!fs) return NULL; diff --git a/src/lib/engines/common/evas_image_main.c b/src/lib/engines/common/evas_image_main.c index 785fb1e..a307fe3 100644 --- a/src/lib/engines/common/evas_image_main.c +++ b/src/lib/engines/common/evas_image_main.c @@ -242,7 +242,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, int w, int h) if (im->image.data) free(im->image.data); im->image.data = malloc(siz); - if (im->image.data == NULL) return -1; + if (!im->image.data) return -1; #ifdef HAVE_VALGRIND # ifdef VALGRIND_MAKE_READABLE @@ -529,7 +529,7 @@ evas_common_image_colorspace_dirty(RGBA_Image *im) EAPI void evas_common_image_set_cache(int size) { - if (eci != NULL) + if (eci) evas_cache_image_set(eci, size); } @@ -542,7 +542,7 @@ evas_common_image_get_cache(void) EAPI RGBA_Image * evas_common_load_image_from_file(const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error) { - if (file == NULL) + if (!file) { *error = EVAS_LOAD_ERROR_GENERIC; return NULL; diff --git a/src/lib/engines/common/evas_pipe.c b/src/lib/engines/common/evas_pipe.c index cf532a4..d0d0f81 100644 --- a/src/lib/engines/common/evas_pipe.c +++ b/src/lib/engines/common/evas_pipe.c @@ -346,7 +346,7 @@ evas_common_frameq_thread(void *data) /* 1. pick a frame to draw */ LKL(frameq->mutex); - while(frame == NULL) + while(!frame) { EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), frame) { @@ -567,7 +567,7 @@ get_max_interval() static long long tv_to_long_long(struct timeval *tv) { - if (tv == NULL) + if (!tv) { return 0; } diff --git a/src/lib/engines/common/evas_tiler.c b/src/lib/engines/common/evas_tiler.c index c29359f..852513b 100644 --- a/src/lib/engines/common/evas_tiler.c +++ b/src/lib/engines/common/evas_tiler.c @@ -19,7 +19,7 @@ rect_list_node_pool_set_max(int max) int diff; diff = list_node_pool.len - max; - for (; diff > 0 && list_node_pool.node != NULL; diff--) + for (; diff > 0 && list_node_pool.node; diff--) { list_node_t *node; @@ -104,10 +104,10 @@ rect_list_print(const list_t rects) int len; len = 0; - for (node = rects.head; node != NULL; node = node->next) len++; + for (node = rects.head; node; node = node->next) len++; putchar('['); - for (node = rects.head; node != NULL; node = node->next) + for (node = rects.head; node; node = node->next) { rect_print(((rect_node_t *)node)->rect); if (node->next) @@ -775,7 +775,7 @@ rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error) merged = 0; parent_node = NULL; node = rects->head; - while (node != NULL) + while (node) { rect_t r2, outer; int area; @@ -1060,7 +1060,7 @@ evas_common_tilebuf_add_motion_vector(Tilebuf *tb, int x, int y, int w, int h, i num = _add_redraw(&lr, tb->outbuf_w, tb->outbuf_h, x, y, w, h); num += _add_redraw(&lr, tb->outbuf_w, tb->outbuf_h, x + dx, y + dy, w, h); - while (lr.head != NULL) + while (lr.head) { list_node_t *node = rect_list_unlink_next(&lr, NULL); rect_list_add_split_fuzzy_and_merge(&tb->rects, node, @@ -1109,7 +1109,7 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb) tb->need_merge = 0; } - for (n = tb->rects.head; n != NULL; n = n->next) { + for (n = tb->rects.head; n; n = n->next) { rect_t cur; cur = ((rect_node_t *)n)->rect; diff --git a/src/lib/file/evas_module.c b/src/lib/file/evas_module.c index 56cb79d..8a724c7 100755 --- a/src/lib/file/evas_module.c +++ b/src/lib/file/evas_module.c @@ -268,7 +268,7 @@ evas_module_init(void) evas_engines = eina_array_new(4); - for (i = 0; evas_static_module[i].init != NULL; ++i) + for (i = 0; evas_static_module[i].init; ++i) evas_static_module[i].init(); } @@ -405,7 +405,7 @@ int evas_module_load(Evas_Module *em) { if (em->loaded) return 1; - if (em->definition == NULL) return 0; + if (!em->definition) return 0; if (!em->definition->func.open(em)) return 0; em->loaded = 1; @@ -421,7 +421,7 @@ evas_module_unload(Evas_Module *em) { if (!em->loaded) return; - if (em->definition == NULL) + if (!em->definition) return ; // for now lets not unload modules - they may still be in use. @@ -523,7 +523,7 @@ evas_module_shutdown(void) char *path; int i; - for (i = 0; evas_static_module[i].shutdown != NULL; ++i) + for (i = 0; evas_static_module[i].shutdown; ++i) evas_static_module[i].shutdown(); EINA_LIST_FREE(eina_evas_modules, en) diff --git a/src/modules/engines/direct3d/evas_engine.c b/src/modules/engines/direct3d/evas_engine.c index 6d6912d..0081e25 100644 --- a/src/modules/engines/direct3d/evas_engine.c +++ b/src/modules/engines/direct3d/evas_engine.c @@ -97,7 +97,7 @@ eng_setup(Evas *e, void *info) Evas_Engine_Info_Direct3D *in; re = (Render_Engine *)e->engine.data.output; in = (Evas_Engine_Info_Direct3D *)info; - if (e->engine.data.output == NULL) + if (!e->engine.data.output) { e->engine.data.output = _output_setup(e->output.w, e->output.h, @@ -108,22 +108,22 @@ eng_setup(Evas *e, void *info) } else if (in->info.fullscreen != 0) { - if (re != NULL) + if (re) evas_direct3d_set_layered(re->d3d, 0, 0, 0, NULL); evas_direct3d_set_fullscreen(re->d3d, -1, -1, 1); } else if (in->info.fullscreen == 0) { evas_direct3d_set_fullscreen(re->d3d, re->width, re->height, 0); - if (re != NULL && in->info.layered == 0) + if (re && in->info.layered == 0) evas_direct3d_set_layered(re->d3d, 0, 0, 0, NULL); - else if (re != NULL && in->info.layered != 0 && in->shape != NULL) + else if (re && in->info.layered != 0 && in->shape) evas_direct3d_set_layered(re->d3d, 1, in->shape->width, in->shape->height, in->shape->mask); } - if (e->engine.data.output == NULL) + if (!e->engine.data.output) return 0; - if (e->engine.data.context == NULL) + if (!e->engine.data.context) e->engine.data.context = e->engine.func->context_new(e->engine.data.output); return 1; diff --git a/src/modules/engines/software_16_x11/evas_x_buffer.c b/src/modules/engines/software_16_x11/evas_x_buffer.c index 8e569f7..3340cbf 100644 --- a/src/modules/engines/software_16_x11/evas_x_buffer.c +++ b/src/modules/engines/software_16_x11/evas_x_buffer.c @@ -68,7 +68,7 @@ evas_software_x11_x_output_buffer_new(Display *d, Visual *v, int depth, int w, i xob->shm_info->readOnly = False; xob->shm_info->shmaddr = xob->xim->data = shmat(xob->shm_info->shmid, 0, 0); - if (xob->shm_info->shmaddr != NULL) + if (xob->shm_info->shmaddr) { XErrorHandler ph; diff --git a/src/modules/engines/software_8_x11/evas_x_buffer.c b/src/modules/engines/software_8_x11/evas_x_buffer.c index 6c6b667..a02abb2 100644 --- a/src/modules/engines/software_8_x11/evas_x_buffer.c +++ b/src/modules/engines/software_8_x11/evas_x_buffer.c @@ -74,7 +74,7 @@ evas_software_x11_x_output_buffer_new(xcb_connection_t * c, xob->shm_info->shmaddr = xob->xim->data = shmat(xob->shm_info->shmid, 0, 0); - if (xob->shm_info->shmaddr != NULL) + if (xob->shm_info->shmaddr) { /* * FIXME: no error mechanism diff --git a/src/modules/engines/software_x11/evas_xcb_buffer.c b/src/modules/engines/software_x11/evas_xcb_buffer.c index c7e9c74..304c1f2 100644 --- a/src/modules/engines/software_x11/evas_xcb_buffer.c +++ b/src/modules/engines/software_x11/evas_xcb_buffer.c @@ -319,7 +319,7 @@ evas_software_xcb_x_output_buffer_new(xcb_connection_t *c, { xcbob->shm_info->shmaddr = xcbob->image->data = shmat(xcbob->shm_info->shmid, 0, 0); - if (xcbob->shm_info->shmaddr != NULL) + if (xcbob->shm_info->shmaddr) { /* * FIXME: no error mechanism diff --git a/src/modules/engines/software_x11/evas_xlib_buffer.c b/src/modules/engines/software_x11/evas_xlib_buffer.c index 873a67e..af0b691 100644 --- a/src/modules/engines/software_x11/evas_xlib_buffer.c +++ b/src/modules/engines/software_x11/evas_xlib_buffer.c @@ -294,7 +294,7 @@ evas_software_xlib_x_output_buffer_new(Display *d, Visual *v, int depth, int w, xob->shm_info->readOnly = False; xob->shm_info->shmaddr = xob->xim->data = shmat(xob->shm_info->shmid, 0, 0); - if (xob->shm_info->shmaddr != NULL) + if (xob->shm_info->shmaddr) { XErrorHandler ph; diff --git a/src/modules/engines/xrender_x11/evas_engine_xcb_ximage.c b/src/modules/engines/xrender_x11/evas_engine_xcb_ximage.c index a0c60ca..cdbcb9b 100644 --- a/src/modules/engines/xrender_x11/evas_engine_xcb_ximage.c +++ b/src/modules/engines/xrender_x11/evas_engine_xcb_ximage.c @@ -333,7 +333,7 @@ _xr_xcb_image_info_get(xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawabl shm_info.shmid = shmget(IPC_PRIVATE, xim->size, IPC_CREAT | 0777); if (shm_info.shmid >= 0) { shm_info.shmaddr = xim->data = shmat(shm_info.shmid, 0, 0); - if ((shm_info.shmaddr != NULL) && (shm_info.shmaddr != (void *) -1)) { + if ((shm_info.shmaddr) && (shm_info.shmaddr != (void *) -1)) { xcb_get_input_focus_reply_t *reply; /* * FIXME: no error mechanism diff --git a/src/modules/loaders/tiff/evas_image_load_tiff.c b/src/modules/loaders/tiff/evas_image_load_tiff.c index f6a70cd..773fa24 100644 --- a/src/modules/loaders/tiff/evas_image_load_tiff.c +++ b/src/modules/loaders/tiff/evas_image_load_tiff.c @@ -305,7 +305,7 @@ evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *ke return EINA_FALSE; } - if (rgba_image.rgba.put.any == NULL) + if (!rgba_image.rgba.put.any) { ERR("Evas Tiff loader: no put function"); diff --git a/src/modules/savers/png/evas_image_save_png.c b/src/modules/savers/png/evas_image_save_png.c index 7938f08..be399c6 100644 --- a/src/modules/savers/png/evas_image_save_png.c +++ b/src/modules/savers/png/evas_image_save_png.c @@ -55,7 +55,7 @@ save_image_png(RGBA_Image *im, const char *file, int compress, int interlace) goto close_file; info_ptr = png_create_info_struct(png_ptr); - if (info_ptr == NULL) + if (!info_ptr) { png_destroy_write_struct(&png_ptr, NULL); goto close_file; -- 2.7.4