summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyoyoung Chang <hyoyoung.chang@samsung.com>2010-09-13 13:33:10 +0900
committerHyoyoung Chang <hyoyoung.chang@samsung.com>2010-09-13 13:33:10 +0900
commite5b5799d5dcbbac493daf8a47d92e44dc8130357 (patch)
tree2d2f54a5ebbcaa16bec2248fc113578e30d7077e
parentea4755faf0cb0c91f69906a3de2d4e09559c44af (diff)
downloadedje-e5b5799d5dcbbac493daf8a47d92e44dc8130357.tar.gz
edje-e5b5799d5dcbbac493daf8a47d92e44dc8130357.tar.bz2
edje-e5b5799d5dcbbac493daf8a47d92e44dc8130357.zip
[efl-upgrade]
-rwxr-xr-xsrc/bin/edje_cc_handlers.c2
-rw-r--r--src/bin/edje_cc_parse.c2
-rw-r--r--src/bin/edje_convert.c4
-rw-r--r--src/bin/edje_convert_main.c4
-rw-r--r--src/bin/edje_player.c2
-rw-r--r--src/lib/edje_calc.c2
-rw-r--r--src/lib/edje_convert.c4
-rw-r--r--src/lib/edje_embryo.c4
-rw-r--r--src/lib/edje_external.c2
-rw-r--r--src/lib/edje_load.c8
-rw-r--r--src/lib/edje_lua.c6
-rw-r--r--src/lib/edje_match.c8
-rw-r--r--src/lib/edje_message_queue.c2
-rw-r--r--src/lib/edje_private.h2
-rw-r--r--src/lib/edje_program.c8
-rw-r--r--src/lib/edje_text.c4
-rw-r--r--src/lib/edje_util.c14
17 files changed, 39 insertions, 39 deletions
diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c
index 11f0162..1bcb552 100755
--- a/src/bin/edje_cc_handlers.c
+++ b/src/bin/edje_cc_handlers.c
@@ -1736,7 +1736,7 @@ ob_collections_group(void)
Edje_Part_Collection *pc;
Code *cd;
- if (current_de != NULL && current_de->entry == NULL)
+ if (current_de && !current_de->entry)
{
ERR("%p: Error. A collection without a name was detected, that's not allowed.", progname);
exit(-1);
diff --git a/src/bin/edje_cc_parse.c b/src/bin/edje_cc_parse.c
index effe5f3..1c63b5f 100644
--- a/src/bin/edje_cc_parse.c
+++ b/src/bin/edje_cc_parse.c
@@ -445,7 +445,7 @@ parse(char *data, off_t size)
p = data;
end = data + size;
line = 1;
- while ((token = next_token(p, end, &p, &delim)) != NULL)
+ while ((token = next_token(p, end, &p, &delim)))
{
/* if we are in param mode, the only delimiter
* we'll accept is the semicolon
diff --git a/src/bin/edje_convert.c b/src/bin/edje_convert.c
index 7e9a73e..5b05da9 100644
--- a/src/bin/edje_convert.c
+++ b/src/bin/edje_convert.c
@@ -269,8 +269,8 @@ _edje_collection_convert(Eet_File *ef, Edje_Part_Collection_Directory_Entry *ce,
_edje_collection_program_add(&edc->programs.nocmp,
&edc->programs.nocmp_count,
pg);
- else if (pg->signal && strpbrk(pg->signal, "*?[\\") == NULL
- && pg->source && strpbrk(pg->source, "*?[\\") == NULL)
+ else if (pg->signal && !strpbrk(pg->signal, "*?[\\")
+ && pg->source && !strpbrk(pg->source, "*?[\\"))
_edje_collection_program_add(&edc->programs.strcmp,
&edc->programs.strcmp_count,
pg);
diff --git a/src/bin/edje_convert_main.c b/src/bin/edje_convert_main.c
index 5ab5ef9..b241d77 100644
--- a/src/bin/edje_convert_main.c
+++ b/src/bin/edje_convert_main.c
@@ -57,7 +57,7 @@ _edje_alias_int(const char *target, Eet_File *ef, const char *base, const char *
snprintf(buf, sizeof (buf), "%s/", base);
strcat(buf, "%i");
- for (i = 0; i < count && match != NULL; ++i)
+ for (i = 0; i < count && match; ++i)
{
char name[1024];
int id;
@@ -87,7 +87,7 @@ _edje_alias_string(const char *target, Eet_File *ef, const char *base, const cha
snprintf(buf, sizeof (buf), "%s/", base);
strcat(buf, "%s");
- for (i = 0; i < count && match != NULL; ++i)
+ for (i = 0; i < count && match; ++i)
{
char name[1024];
char id[1024];
diff --git a/src/bin/edje_player.c b/src/bin/edje_player.c
index bc65d7f..2c8d54b 100644
--- a/src/bin/edje_player.c
+++ b/src/bin/edje_player.c
@@ -226,7 +226,7 @@ _slave_mode(void *data, Ecore_Fd_Handler *fd_handler)
}
}
- for (itr = _slave_mode_commands; itr->cmd != NULL; itr++)
+ for (itr = _slave_mode_commands; itr->cmd; itr++)
{
if (strcmp(itr->cmd, buf) == 0)
{
diff --git a/src/lib/edje_calc.c b/src/lib/edje_calc.c
index 2cc3f8c..b339edb 100644
--- a/src/lib/edje_calc.c
+++ b/src/lib/edje_calc.c
@@ -125,7 +125,7 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
epdi = (Edje_Part_Description_Image*) epd2;
/* There is an animation if both description are different or if description is an image with tweens */
- if (epd2 != NULL && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epdi->image.tweens_count)))
+ if (epd2 && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epdi->image.tweens_count)))
{
if (!ep->param2)
{
diff --git a/src/lib/edje_convert.c b/src/lib/edje_convert.c
index 58dccc2..6b183fd 100644
--- a/src/lib/edje_convert.c
+++ b/src/lib/edje_convert.c
@@ -321,8 +321,8 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
_edje_collection_program_add(&edc->programs.nocmp,
&edc->programs.nocmp_count,
pg);
- else if (pg->signal && strpbrk(pg->signal, "*?[\\") == NULL
- && pg->source && strpbrk(pg->source, "*?[\\") == NULL)
+ else if (pg->signal && !strpbrk(pg->signal, "*?[\\")
+ && pg->source && !strpbrk(pg->source, "*?[\\"))
_edje_collection_program_add(&edc->programs.strcmp,
&edc->programs.strcmp_count,
pg);
diff --git a/src/lib/edje_embryo.c b/src/lib/edje_embryo.c
index 96e9cb8..bcaa25a 100644
--- a/src/lib/edje_embryo.c
+++ b/src/lib/edje_embryo.c
@@ -1152,7 +1152,7 @@ _edje_embryo_fn_get_color_class(Embryo_Program *ep, Embryo_Cell *params)
GETSTR(class, params[1]);
if (!class) return 0;
c_class = _edje_color_class_find(ed, class);
- if (c_class == NULL) return 0;
+ if (!c_class) return 0;
SETINT(c_class->r, params[2]);
SETINT(c_class->g, params[3]);
SETINT(c_class->b, params[4]);
@@ -1208,7 +1208,7 @@ _edje_embryo_fn_get_text_class(Embryo_Program *ep, Embryo_Cell *params)
GETSTR(class, params[1]);
if (!class) return 0;
t_class = _edje_text_class_find(ed, class);
- if (t_class == NULL) return 0;
+ if (!t_class) return 0;
SETSTR((char *)t_class->font, params[2]);
SETFLOAT(t_class->size, params[3]);
return 0;
diff --git a/src/lib/edje_external.c b/src/lib/edje_external.c
index bf60d24..b25e21e 100644
--- a/src/lib/edje_external.c
+++ b/src/lib/edje_external.c
@@ -239,7 +239,7 @@ edje_object_part_external_param_type_get(const Evas_Object *obj, const char *par
type->module_name);
return EDJE_EXTERNAL_PARAM_TYPE_MAX;
}
- for (info = type->parameters_info; info->name != NULL; info++)
+ for (info = type->parameters_info; info->name; info++)
if (strcmp(info->name, param) == 0)
return info->type;
diff --git a/src/lib/edje_load.c b/src/lib/edje_load.c
index 4d2acfd..f07578b 100644
--- a/src/lib/edje_load.c
+++ b/src/lib/edje_load.c
@@ -139,7 +139,7 @@ edje_file_collection_list(const char *file)
if ((!file) || (!*file)) return NULL;
edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL);
- if (edf != NULL)
+ if (edf)
{
Eina_Iterator *i;
const char *key;
@@ -186,7 +186,7 @@ edje_file_group_exists(const char *file, const char *glob)
if ((!file) || (!*file)) return EINA_FALSE;
edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL);
- if (edf != NULL)
+ if (edf)
{
Edje_Patterns *patterns;
@@ -246,7 +246,7 @@ edje_file_data_get(const char *file, const char *key)
if (key)
{
edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL);
- if (edf != NULL)
+ if (edf)
{
str = (char*) edje_string_get(eina_hash_find(edf->data, key));
@@ -883,7 +883,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
void
_edje_file_add(Edje *ed)
{
- if (_edje_edd_edje_file == NULL) return;
+ if (!_edje_edd_edje_file) return;
ed->file = _edje_cache_file_coll_open(ed->path, ed->group,
&(ed->load_error),
&(ed->collection));
diff --git a/src/lib/edje_lua.c b/src/lib/edje_lua.c
index b01d0ad..c29e839 100644
--- a/src/lib/edje_lua.c
+++ b/src/lib/edje_lua.c
@@ -385,7 +385,7 @@ _edje_lua_new_class(lua_State *L, const Edje_Lua_Reg ** class)
{
int n = 0;
_edje_lua_new_metatable(L, class);
- while (class && (class[n] != NULL))
+ while (class && (class[n]))
{
luaL_register(L, NULL, class[n]->mt);
lua_pushstring(L, "hands off, it's none of your business!");
@@ -5075,7 +5075,7 @@ _edje_lua_alloc(void *ud, void *ptr, size_t osize, size_t nsize)
void
_edje_lua_init()
{
- if (Ledje != NULL) return;
+ if (Ledje) return;
/*
* create main Lua state with the custom memory allocation function
*/
@@ -5161,7 +5161,7 @@ _edje_lua_init()
void
_edje_lua_shutdown()
{
- if (Ledje == NULL) return;
+ if (!Ledje) return;
lua_close(Ledje);
Ledje = NULL;
}
diff --git a/src/lib/edje_match.c b/src/lib/edje_match.c
index 85aa3b1..b9ff606 100644
--- a/src/lib/edje_match.c
+++ b/src/lib/edje_match.c
@@ -673,8 +673,8 @@ edje_match_program_hash_build(Edje_Program * const *programs,
for (i = 0; i < count; ++i)
{
- if (programs[i]->signal && strpbrk(programs[i]->signal, "*?[\\") == NULL
- && programs[i]->source && strpbrk(programs[i]->source, "*?[\\") == NULL)
+ if (programs[i]->signal && !strpbrk(programs[i]->signal, "*?[\\")
+ && programs[i]->source && !strpbrk(programs[i]->source, "*?[\\"))
{
Edje_Signal_Source_Char *item;
@@ -714,8 +714,8 @@ edje_match_callback_hash_build(const Eina_List *callbacks,
EINA_LIST_FOREACH(callbacks, l, callback)
{
- if (callback->signal && strpbrk(callback->signal, "*?[\\") == NULL
- && callback->source && strpbrk(callback->source, "*?[\\") == NULL)
+ if (callback->signal && !strpbrk(callback->signal, "*?[\\")
+ && callback->source && !strpbrk(callback->source, "*?[\\"))
{
Edje_Signal_Source_Char *item;
diff --git a/src/lib/edje_message_queue.c b/src/lib/edje_message_queue.c
index 25b0dcb..3ffb137 100644
--- a/src/lib/edje_message_queue.c
+++ b/src/lib/edje_message_queue.c
@@ -691,7 +691,7 @@ _edje_message_queue_process(void)
{
int i;
- if (msgq == NULL) return;
+ if (!msgq) return;
/* allow the message queue to feed itself up to 8 times before forcing */
/* us to go back to normal processing and let a 0 timeout deal with it */
diff --git a/src/lib/edje_private.h b/src/lib/edje_private.h
index 4fd606a..08834c2 100644
--- a/src/lib/edje_private.h
+++ b/src/lib/edje_private.h
@@ -1758,7 +1758,7 @@ edje_program_is_strrncmp(const char *str)
{
if (*str != '*' && *str != '?')
return EINA_FALSE;
- if (strpbrk(str + 1, "*?[\\") != NULL)
+ if (strpbrk(str + 1, "*?[\\"))
return EINA_FALSE;
return EINA_TRUE;
}
diff --git a/src/lib/edje_program.c b/src/lib/edje_program.c
index fdaaf23..53092d4 100644
--- a/src/lib/edje_program.c
+++ b/src/lib/edje_program.c
@@ -844,7 +844,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
#ifdef LUA2
_edje_lua2_script_init(ed);
#else
- if (ed->L == NULL) /* private state does not yet exist, create it */
+ if (!ed->L) /* private state does not yet exist, create it */
{
ed->L = _edje_lua_new_thread(ed, _edje_lua_state_get());
}
@@ -1032,7 +1032,7 @@ _edje_emit(Edje *ed, const char *sig, const char *src)
/* The part contain a [index], retrieve it */
idx = strchr(sig, EDJE_PART_PATH_SEPARATOR_INDEXL);
- if (idx == NULL || sep < idx) newsig = part + (sep - sig);
+ if (!idx || sep < idx) newsig = part + (sep - sig);
else newsig = part + (idx - sig);
*newsig = '\0';
@@ -1391,7 +1391,7 @@ _edje_external_param_info_get(const Evas_Object *obj, const char *name)
type = evas_object_data_get(obj, "Edje_External_Type");
if (!type) return NULL;
- for (info = type->parameters_info; info->name != NULL; info++)
+ for (info = type->parameters_info; info->name; info++)
if (!strcmp(info->name, name)) return info;
return NULL;
@@ -1974,7 +1974,7 @@ _edje_param_validate(const Edje_External_Param *param, const Edje_External_Param
{
const char **itr = info->info.c.choices;
if (!itr) return EINA_FALSE;
- for (; *itr != NULL; itr++)
+ for (; *itr; itr++)
if (!strcmp(*itr, param->s))
return EINA_TRUE;
return EINA_FALSE;
diff --git a/src/lib/edje_text.c b/src/lib/edje_text.c
index 23dd35f..2fdb0c5 100644
--- a/src/lib/edje_text.c
+++ b/src/lib/edje_text.c
@@ -394,7 +394,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
if (ep->text.cache.in_str) eina_stringshare_del(ep->text.cache.in_str);
ep->text.cache.in_str = eina_stringshare_add(text);
ep->text.cache.in_size = size;
- if (chosen_desc->text.fit_x && (ep->text.cache.in_str != NULL && eina_stringshare_strlen(ep->text.cache.in_str) > 0))
+ if (chosen_desc->text.fit_x && (ep->text.cache.in_str && eina_stringshare_strlen(ep->text.cache.in_str) > 0))
{
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
else evas_object_text_font_source_set(ep->object, NULL);
@@ -437,7 +437,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
}
}
}
- if (chosen_desc->text.fit_y && (ep->text.cache.in_str != NULL && eina_stringshare_strlen(ep->text.cache.in_str) > 0))
+ if (chosen_desc->text.fit_y && (ep->text.cache.in_str && eina_stringshare_strlen(ep->text.cache.in_str) > 0))
{
/* if we fit in the x axis, too, size already has a somewhat
* meaningful value, so don't overwrite it with the starting
diff --git a/src/lib/edje_util.c b/src/lib/edje_util.c
index 69c37cb..1d44bf7 100644
--- a/src/lib/edje_util.c
+++ b/src/lib/edje_util.c
@@ -2466,7 +2466,7 @@ _edje_box_layout_builtin_find(const char *name)
return NULL;
}
- for (; (base->name != NULL) && (base->name[0] == name[0]); base++)
+ for (; (base->name) && (base->name[0] == name[0]); base++)
if (strcmp(base->name, name) == 0)
return base->cb;
@@ -4435,13 +4435,13 @@ _edje_real_part_recursive_get_helper(Edje *ed, char **path)
if (alias)
{
rp = _edje_real_part_recursive_get(ed, alias);
- if (path[1] == NULL) return rp;
+ if (!path[1]) return rp;
if (!rp) return NULL;
}
else
{
rp = _edje_real_part_get(ed, path[0]);
- if (path[1] == NULL) return rp;
+ if (!path[1]) return rp;
if (!rp) return NULL;
}
@@ -4965,8 +4965,8 @@ _edje_program_remove(Edje_Part_Collection *edc, Edje_Program *p)
array = &edc->programs.nocmp;
count = &edc->programs.nocmp_count;
}
- else if (p->signal && strpbrk(p->signal, "*?[\\") == NULL
- && p->source && strpbrk(p->source, "*?[\\") == NULL)
+ else if (p->signal && !strpbrk(p->signal, "*?[\\")
+ && p->source && !strpbrk(p->source, "*?[\\"))
{
array = &edc->programs.strcmp;
count = &edc->programs.strcmp_count;
@@ -5009,8 +5009,8 @@ _edje_program_insert(Edje_Part_Collection *edc, Edje_Program *p)
array = &edc->programs.nocmp;
count = &edc->programs.nocmp_count;
}
- else if (p->signal && strpbrk(p->signal, "*?[\\") == NULL
- && p->source && strpbrk(p->source, "*?[\\") == NULL)
+ else if (p->signal && !strpbrk(p->signal, "*?[\\")
+ && p->source && !strpbrk(p->source, "*?[\\"))
{
array = &edc->programs.strcmp;
count = &edc->programs.strcmp_count;