diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2015-02-13 14:20:32 +0000 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@samsung.com> | 2015-02-13 14:20:32 +0000 |
commit | 2b8bc02e1226594c8b7bb155bf8ddc42ce1961ce (patch) | |
tree | dfe147b1e13a32d0cf34c6f1fc5acbeb69467696 | |
parent | 06fe2fad0eb5bc16b58a448ba1c15cf9e53d9209 (diff) |
edje, eeze: compiler portability (use full ternary operator)
-rw-r--r-- | src/bin/edje/edje_cc_handlers.c | 10 | ||||
-rw-r--r-- | src/examples/edje/edje-box2.c | 4 | ||||
-rw-r--r-- | src/lib/eeze/eeze_disk_mount.c | 6 |
3 files changed, 12 insertions, 8 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 7b27b4f49c..2e1646588f 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c | |||
@@ -10187,6 +10187,7 @@ ob_collections_group_parts_part_description_link(void) | |||
10187 | Edje_Part_Collection_Parser *pcp; | 10187 | Edje_Part_Collection_Parser *pcp; |
10188 | Edje_Part_Parser *epp; | 10188 | Edje_Part_Parser *epp; |
10189 | Edje_Part_Description_Link *el; | 10189 | Edje_Part_Description_Link *el; |
10190 | const char *nm; | ||
10190 | 10191 | ||
10191 | pcp = eina_list_last_data_get(edje_collections); | 10192 | pcp = eina_list_last_data_get(edje_collections); |
10192 | epp = (Edje_Part_Parser*)current_part; | 10193 | epp = (Edje_Part_Parser*)current_part; |
@@ -10199,7 +10200,8 @@ ob_collections_group_parts_part_description_link(void) | |||
10199 | el->epp = epp; | 10200 | el->epp = epp; |
10200 | pcp->links = eina_list_append(pcp->links, el); | 10201 | pcp->links = eina_list_append(pcp->links, el); |
10201 | current_program->action = EDJE_ACTION_TYPE_STATE_SET; | 10202 | current_program->action = EDJE_ACTION_TYPE_STATE_SET; |
10202 | current_program->state = strdup(current_desc->state.name ?: "default"); | 10203 | nm = current_desc->state.name; |
10204 | current_program->state = strdup(nm ? nm : "default"); | ||
10203 | current_program->value = current_desc->state.value; | 10205 | current_program->value = current_desc->state.value; |
10204 | } | 10206 | } |
10205 | 10207 | ||
@@ -10238,7 +10240,8 @@ st_collections_group_parts_part_description_link_base(void) | |||
10238 | name = parse_str(0); | 10240 | name = parse_str(0); |
10239 | if (current_program->signal && pcp->link_hash) | 10241 | if (current_program->signal && pcp->link_hash) |
10240 | { | 10242 | { |
10241 | snprintf(buf, sizeof(buf), "%s\"\"\"%s", current_program->signal, current_program->source ?: ""); | 10243 | snprintf(buf, sizeof(buf), "%s\"\"\"%s", current_program->signal, |
10244 | current_program->source ? current_program->source: ""); | ||
10242 | eina_hash_list_remove(pcp->link_hash, buf, el); | 10245 | eina_hash_list_remove(pcp->link_hash, buf, el); |
10243 | } | 10246 | } |
10244 | if (!pcp->link_hash) | 10247 | if (!pcp->link_hash) |
@@ -10251,7 +10254,8 @@ st_collections_group_parts_part_description_link_base(void) | |||
10251 | free((void*)current_program->source); | 10254 | free((void*)current_program->source); |
10252 | current_program->source = name; | 10255 | current_program->source = name; |
10253 | } | 10256 | } |
10254 | snprintf(buf, sizeof(buf), "%s\"\"\"%s", current_program->signal, current_program->source ?: ""); | 10257 | snprintf(buf, sizeof(buf), "%s\"\"\"%s", current_program->signal, |
10258 | current_program->source ? current_program->source : ""); | ||
10255 | EINA_LIST_FOREACH(eina_hash_find(pcp->link_hash, buf), l, ell) | 10259 | EINA_LIST_FOREACH(eina_hash_find(pcp->link_hash, buf), l, ell) |
10256 | { | 10260 | { |
10257 | if (ell->epp == el->epp) | 10261 | if (ell->epp == el->epp) |
diff --git a/src/examples/edje/edje-box2.c b/src/examples/edje/edje-box2.c index c61913bfbf..9dea39373e 100644 --- a/src/examples/edje/edje-box2.c +++ b/src/examples/edje/edje-box2.c | |||
@@ -46,8 +46,8 @@ custom_layout(Evas_Object *o, Evas_Object_Box_Data *p, void *data EINA_UNUSED) | |||
46 | 46 | ||
47 | evas_object_geometry_get(o, &x, &y, &w, &h); | 47 | evas_object_geometry_get(o, &x, &y, &w, &h); |
48 | count = eina_list_count(p->children); | 48 | count = eina_list_count(p->children); |
49 | ww = w / (count?:1); | 49 | ww = w / (count ? count : 1); |
50 | hh = h / (count?:1); | 50 | hh = h / (count ? count : 1); |
51 | if (ww < 1) ww = 1; | 51 | if (ww < 1) ww = 1; |
52 | if (hh < 1) hh = 1; | 52 | if (hh < 1) hh = 1; |
53 | 53 | ||
diff --git a/src/lib/eeze/eeze_disk_mount.c b/src/lib/eeze/eeze_disk_mount.c index 1821a375af..ed151d04be 100644 --- a/src/lib/eeze/eeze_disk_mount.c +++ b/src/lib/eeze/eeze_disk_mount.c | |||
@@ -297,9 +297,9 @@ eeze_disk_mount(Eeze_Disk *disk) | |||
297 | if (disk->mount_wrapper) | 297 | if (disk->mount_wrapper) |
298 | eina_strbuf_append_printf(disk->mount_cmd, "%s ", disk->mount_wrapper); | 298 | eina_strbuf_append_printf(disk->mount_cmd, "%s ", disk->mount_wrapper); |
299 | if (disk->mount_opts == EEZE_DISK_MOUNTOPT_DEFAULTS) | 299 | if (disk->mount_opts == EEZE_DISK_MOUNTOPT_DEFAULTS) |
300 | eina_strbuf_append_printf(disk->mount_cmd, EEZE_MOUNT_BIN" -o "EEZE_MOUNT_DEFAULT_OPTS" %s%s %s", str ?: "", dev, disk->mount_point); | 300 | eina_strbuf_append_printf(disk->mount_cmd, EEZE_MOUNT_BIN" -o "EEZE_MOUNT_DEFAULT_OPTS" %s%s %s", str ? str : "", dev, disk->mount_point); |
301 | else if (!disk->mount_opts) | 301 | else if (!disk->mount_opts) |
302 | eina_strbuf_append_printf(disk->mount_cmd, EEZE_MOUNT_BIN" %s%s %s", str ?: "", dev, disk->mount_point); | 302 | eina_strbuf_append_printf(disk->mount_cmd, EEZE_MOUNT_BIN" %s%s %s", str ? str : "", dev, disk->mount_point); |
303 | else | 303 | else |
304 | { | 304 | { |
305 | eina_strbuf_append(disk->mount_cmd, EEZE_MOUNT_BIN" -o "); | 305 | eina_strbuf_append(disk->mount_cmd, EEZE_MOUNT_BIN" -o "); |
@@ -324,7 +324,7 @@ eeze_disk_mount(Eeze_Disk *disk) | |||
324 | eina_strbuf_append(disk->mount_cmd, "remount,"); | 324 | eina_strbuf_append(disk->mount_cmd, "remount,"); |
325 | if (disk->mount_opts & EEZE_DISK_MOUNTOPT_UID) | 325 | if (disk->mount_opts & EEZE_DISK_MOUNTOPT_UID) |
326 | eina_strbuf_append_printf(disk->mount_cmd, "uid=%i,", (int)disk->uid); | 326 | eina_strbuf_append_printf(disk->mount_cmd, "uid=%i,", (int)disk->uid); |
327 | eina_strbuf_append_printf(disk->mount_cmd, " %s%s %s", str ?: "", dev, disk->mount_point); | 327 | eina_strbuf_append_printf(disk->mount_cmd, " %s%s %s", str ? str : "", dev, disk->mount_point); |
328 | } | 328 | } |
329 | disk->mount_cmd_changed = EINA_FALSE; | 329 | disk->mount_cmd_changed = EINA_FALSE; |
330 | } | 330 | } |