From 8094cbf79b85aa8afbdcafe67d7441ba3c96650c Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Thu, 10 Feb 2011 14:34:03 +0000 Subject: [PATCH] move NON_EXISTING define to efreet_cache SVN revision: 56917 --- legacy/efreet/src/lib/efreet_cache.c | 2 ++ legacy/efreet/src/lib/efreet_icon.c | 9 +++------ legacy/efreet/src/lib/efreet_private.h | 2 -- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/legacy/efreet/src/lib/efreet_cache.c b/legacy/efreet/src/lib/efreet_cache.c index e7291e1226..b904f74d1f 100644 --- a/legacy/efreet/src/lib/efreet_cache.c +++ b/legacy/efreet/src/lib/efreet_cache.c @@ -24,6 +24,8 @@ static int _efreet_cache_log_dom = -1; #include "efreet_private.h" #include "efreet_cache_private.h" +#define NON_EXISTING (void *)-1 + typedef struct _Efreet_Old_Cache Efreet_Old_Cache; struct _Efreet_Old_Cache diff --git a/legacy/efreet/src/lib/efreet_icon.c b/legacy/efreet/src/lib/efreet_icon.c index fbd196c2eb..3ac3c442ae 100644 --- a/legacy/efreet/src/lib/efreet_icon.c +++ b/legacy/efreet/src/lib/efreet_icon.c @@ -307,7 +307,7 @@ efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int siz /* we didn't find the icon in the theme or in the inherited directories * then just look for a non theme icon */ - if (!value || (value == NON_EXISTING)) + if (!value) { Efreet_Cache_Fallback_Icon *cache; @@ -316,8 +316,6 @@ efreet_icon_path_find(const char *theme_name, const char *icon, unsigned int siz if (!value) INF("lookup for `%s` failed in fallback too with %p.", icon, cache); } - if (value == NON_EXISTING) value = NULL; - #ifdef SLOPPY_SPEC FREE(tmp); #endif @@ -390,14 +388,14 @@ efreet_icon_list_find(const char *theme_name, Eina_List *icons, /* we didn't find the icons in the theme or in the inherited directories * then just look for a non theme icon */ - if (!value || (value == NON_EXISTING)) + if (!value) { Efreet_Cache_Fallback_Icon *cache; EINA_LIST_FOREACH(tmps, l, icon) { cache = efreet_cache_icon_fallback_find(icon); value = efreet_icon_fallback_lookup_path(cache); - if (value && (value != NON_EXISTING)) + if (value) break; } } @@ -407,7 +405,6 @@ efreet_icon_list_find(const char *theme_name, Eina_List *icons, free(data); #endif - if (value == NON_EXISTING) value = NULL; return value; } diff --git a/legacy/efreet/src/lib/efreet_private.h b/legacy/efreet/src/lib/efreet_private.h index 507fc6c477..e213d28b0b 100644 --- a/legacy/efreet/src/lib/efreet_private.h +++ b/legacy/efreet/src/lib/efreet_private.h @@ -209,8 +209,6 @@ EAPI void efreet_hash_free(Eina_Hash *hash, Eina_Free_Cb free_cb); EAPI void efreet_setowner(const char *path); EAPI void efreet_fsetowner(int fd); -#define NON_EXISTING (void *)-1 - EAPI extern int efreet_cache_update; /**