From ab2c330b2746792de779a1dc63d09112d6815075 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 4 Aug 2017 16:11:00 -0400 Subject: [PATCH] ecore-wl2: simplify server pid detection --- src/lib/ecore_wl2/ecore_wl2_display.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index dc7fb0d..a578964 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -855,26 +855,7 @@ found: static Eina_Bool _ecore_wl2_display_sync_get(void) { - Ecore_Wl2_Display *sewd; - Eina_Iterator *itr; - Eina_Bool ret = EINA_TRUE; - void *data; - - if (eina_hash_population(_server_displays) < 1) return ret; - - itr = eina_hash_iterator_data_new(_server_displays); - while (eina_iterator_next(itr, &data)) - { - sewd = (Ecore_Wl2_Display *)data; - if (sewd->pid == getpid()) - { - ret = EINA_FALSE; - break; - } - } - eina_iterator_free(itr); - - return ret; + return !_server_displays || !eina_hash_population(_server_displays); } EAPI Ecore_Wl2_Display * -- 2.7.4