forked from enlightenment/efl
ecore-wl2: Cleanup function for finding global
As per Mike, the iterator macro already does the casting for us, so we can cleanup the code here and not do casting, plus we can remove an extra variable...bonus ;) Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
b0bd191f7b
commit
da22b6fc66
|
@ -405,22 +405,16 @@ static Ecore_Wl2_Global *
|
|||
_ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface)
|
||||
{
|
||||
Eina_Iterator *itr;
|
||||
Ecore_Wl2_Global *global = NULL;
|
||||
void *data;
|
||||
Ecore_Wl2_Global *global = NULL, *g = NULL;
|
||||
|
||||
itr = eina_hash_iterator_data_new(ewd->globals);
|
||||
if (!itr) return NULL;
|
||||
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
EINA_ITERATOR_FOREACH(itr, g)
|
||||
{
|
||||
Ecore_Wl2_Global *g = NULL;
|
||||
|
||||
g = (Ecore_Wl2_Global *)data;
|
||||
if (!g) continue;
|
||||
|
||||
if (!strcmp(g->interface, interface))
|
||||
{
|
||||
global = data;
|
||||
global = g;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue