From: hermet Date: Fri, 9 Mar 2012 13:02:16 +0000 (+0000) Subject: elemenatry/index - removed unnecesary compare and return when realloc is failed X-Git-Tag: REL_F_I9500_20120323_1~17^2~126 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63e94ecddf404ab4d7e40574685e81707d4ec388;p=framework%2Fuifw%2Felementary.git elemenatry/index - removed unnecesary compare and return when realloc is failed git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69099 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c index 90e478b..bd3c672 100644 --- a/src/lib/elm_index.c +++ b/src/lib/elm_index.c @@ -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);