elemenatry/index - removed unnecesary compare and return when realloc is failed

SVN revision: 69099
This commit is contained in:
ChunEon Park 2012-03-09 13:02:16 +00:00
parent c1d0908120
commit d25bfa1266
1 changed files with 4 additions and 3 deletions

View File

@ -368,8 +368,8 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
evas_object_geometry_get(wd->bx[i], &bx, &by, &bw, &bh);
EINA_LIST_FOREACH(wd->items, l, it)
{
if (!((it->level == i) && (VIEW(it)))) continue;
if ((VIEW(it)) && (it->level != wd->level))
if (it->level != i) continue;
if (it->level != wd->level)
{
if (it->selected)
{
@ -443,8 +443,8 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
if (!label) label = strdup(last);
else
{
/* FIXME: realloc return NULL if the request fails */
label = realloc(label, strlen(label) + strlen(last) + 1);
if (!label) return;
strcat(label, last);
}
free(last);
@ -452,6 +452,7 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
}
}
}
if (!label) label = strdup("");
if (!last) last = strdup("");
edje_object_part_text_set(wd->base, "elm.text.body", label);