forked from enlightenment/efl
edje, eeze: compiler portability (use full ternary operator)
This commit is contained in:
parent
06fe2fad0e
commit
2b8bc02e12
|
@ -10187,6 +10187,7 @@ ob_collections_group_parts_part_description_link(void)
|
|||
Edje_Part_Collection_Parser *pcp;
|
||||
Edje_Part_Parser *epp;
|
||||
Edje_Part_Description_Link *el;
|
||||
const char *nm;
|
||||
|
||||
pcp = eina_list_last_data_get(edje_collections);
|
||||
epp = (Edje_Part_Parser*)current_part;
|
||||
|
@ -10199,7 +10200,8 @@ ob_collections_group_parts_part_description_link(void)
|
|||
el->epp = epp;
|
||||
pcp->links = eina_list_append(pcp->links, el);
|
||||
current_program->action = EDJE_ACTION_TYPE_STATE_SET;
|
||||
current_program->state = strdup(current_desc->state.name ?: "default");
|
||||
nm = current_desc->state.name;
|
||||
current_program->state = strdup(nm ? nm : "default");
|
||||
current_program->value = current_desc->state.value;
|
||||
}
|
||||
|
||||
|
@ -10238,7 +10240,8 @@ st_collections_group_parts_part_description_link_base(void)
|
|||
name = parse_str(0);
|
||||
if (current_program->signal && pcp->link_hash)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s\"\"\"%s", current_program->signal, current_program->source ?: "");
|
||||
snprintf(buf, sizeof(buf), "%s\"\"\"%s", current_program->signal,
|
||||
current_program->source ? current_program->source: "");
|
||||
eina_hash_list_remove(pcp->link_hash, buf, el);
|
||||
}
|
||||
if (!pcp->link_hash)
|
||||
|
@ -10251,7 +10254,8 @@ st_collections_group_parts_part_description_link_base(void)
|
|||
free((void*)current_program->source);
|
||||
current_program->source = name;
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "%s\"\"\"%s", current_program->signal, current_program->source ?: "");
|
||||
snprintf(buf, sizeof(buf), "%s\"\"\"%s", current_program->signal,
|
||||
current_program->source ? current_program->source : "");
|
||||
EINA_LIST_FOREACH(eina_hash_find(pcp->link_hash, buf), l, ell)
|
||||
{
|
||||
if (ell->epp == el->epp)
|
||||
|
|
|
@ -46,8 +46,8 @@ custom_layout(Evas_Object *o, Evas_Object_Box_Data *p, void *data EINA_UNUSED)
|
|||
|
||||
evas_object_geometry_get(o, &x, &y, &w, &h);
|
||||
count = eina_list_count(p->children);
|
||||
ww = w / (count?:1);
|
||||
hh = h / (count?:1);
|
||||
ww = w / (count ? count : 1);
|
||||
hh = h / (count ? count : 1);
|
||||
if (ww < 1) ww = 1;
|
||||
if (hh < 1) hh = 1;
|
||||
|
||||
|
|
|
@ -297,9 +297,9 @@ eeze_disk_mount(Eeze_Disk *disk)
|
|||
if (disk->mount_wrapper)
|
||||
eina_strbuf_append_printf(disk->mount_cmd, "%s ", disk->mount_wrapper);
|
||||
if (disk->mount_opts == EEZE_DISK_MOUNTOPT_DEFAULTS)
|
||||
eina_strbuf_append_printf(disk->mount_cmd, EEZE_MOUNT_BIN" -o "EEZE_MOUNT_DEFAULT_OPTS" %s%s %s", str ?: "", dev, disk->mount_point);
|
||||
eina_strbuf_append_printf(disk->mount_cmd, EEZE_MOUNT_BIN" -o "EEZE_MOUNT_DEFAULT_OPTS" %s%s %s", str ? str : "", dev, disk->mount_point);
|
||||
else if (!disk->mount_opts)
|
||||
eina_strbuf_append_printf(disk->mount_cmd, EEZE_MOUNT_BIN" %s%s %s", str ?: "", dev, disk->mount_point);
|
||||
eina_strbuf_append_printf(disk->mount_cmd, EEZE_MOUNT_BIN" %s%s %s", str ? str : "", dev, disk->mount_point);
|
||||
else
|
||||
{
|
||||
eina_strbuf_append(disk->mount_cmd, EEZE_MOUNT_BIN" -o ");
|
||||
|
@ -324,7 +324,7 @@ eeze_disk_mount(Eeze_Disk *disk)
|
|||
eina_strbuf_append(disk->mount_cmd, "remount,");
|
||||
if (disk->mount_opts & EEZE_DISK_MOUNTOPT_UID)
|
||||
eina_strbuf_append_printf(disk->mount_cmd, "uid=%i,", (int)disk->uid);
|
||||
eina_strbuf_append_printf(disk->mount_cmd, " %s%s %s", str ?: "", dev, disk->mount_point);
|
||||
eina_strbuf_append_printf(disk->mount_cmd, " %s%s %s", str ? str : "", dev, disk->mount_point);
|
||||
}
|
||||
disk->mount_cmd_changed = EINA_FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue