summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-02-28 12:36:05 -0500
committerChris Michael <cp.michael@samsung.com>2017-02-28 12:36:05 -0500
commitda22b6fc669fc1117d27f4bed12b77a9d623eca1 (patch)
tree0bede07c814ea313bb4ccc762a097cb182f6437f
parentb0bd191f7b19178293ad4712622057ca0532e25e (diff)
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>
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index 2437699461..c38e383b5a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -405,22 +405,16 @@ static Ecore_Wl2_Global *
405_ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface) 405_ecore_wl2_global_find(Ecore_Wl2_Display *ewd, const char *interface)
406{ 406{
407 Eina_Iterator *itr; 407 Eina_Iterator *itr;
408 Ecore_Wl2_Global *global = NULL; 408 Ecore_Wl2_Global *global = NULL, *g = NULL;
409 void *data;
410 409
411 itr = eina_hash_iterator_data_new(ewd->globals); 410 itr = eina_hash_iterator_data_new(ewd->globals);
412 if (!itr) return NULL; 411 if (!itr) return NULL;
413 412
414 EINA_ITERATOR_FOREACH(itr, data) 413 EINA_ITERATOR_FOREACH(itr, g)
415 { 414 {
416 Ecore_Wl2_Global *g = NULL;
417
418 g = (Ecore_Wl2_Global *)data;
419 if (!g) continue;
420
421 if (!strcmp(g->interface, interface)) 415 if (!strcmp(g->interface, interface))
422 { 416 {
423 global = data; 417 global = g;
424 break; 418 break;
425 } 419 }
426 } 420 }