move NON_EXISTING define to efreet_cache
authorenglebass <englebass@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 10 Feb 2011 14:34:03 +0000 (14:34 +0000)
committerenglebass <englebass@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 10 Feb 2011 14:34:03 +0000 (14:34 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/efreet@56917 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/efreet_cache.c
src/lib/efreet_icon.c
src/lib/efreet_private.h

index e7291e1..b904f74 100644 (file)
@@ -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
index fbd196c..3ac3c44 100644 (file)
@@ -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;
 }
 
index 507fc6c..e213d28 100644 (file)
@@ -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;
 
 /**