summaryrefslogtreecommitdiff
path: root/src/bin/e_path.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2008-12-17 16:14:10 +0000
committerCedric BAIL <cedric.bail@free.fr>2008-12-17 16:14:10 +0000
commitbe8de8a554b1264ef9d5139d3f9c986aa5fd3522 (patch)
tree10e0b8a560353013efdbf6cdd11ed670e0d2cb3f /src/bin/e_path.c
parent773d102291f1341a5e11c5a05027ede526b8d600 (diff)
Create the hash anyway as we are about to add something to it. This will remove
some warning about eina_hash_population on NULL hash. SVN revision: 38187
Diffstat (limited to 'src/bin/e_path.c')
-rw-r--r--src/bin/e_path.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/e_path.c b/src/bin/e_path.c
index 6d1b832..801199d 100644
--- a/src/bin/e_path.c
+++ b/src/bin/e_path.c
@@ -257,10 +257,10 @@ e_path_find(E_Path *ep, const char *file)
257 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file); 257 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file);
258 if (ecore_file_exists(buf)) 258 if (ecore_file_exists(buf))
259 { 259 {
260 if (eina_hash_population(ep->hash) >= 512)
261 _e_path_cache_free(ep);
262 if (!ep->hash) 260 if (!ep->hash)
263 ep->hash = eina_hash_string_superfast_new(NULL); 261 ep->hash = eina_hash_string_superfast_new(NULL);
262 if (eina_hash_population(ep->hash) >= 512)
263 _e_path_cache_free(ep);
264 eina_hash_add(ep->hash, file, 264 eina_hash_add(ep->hash, file,
265 eina_stringshare_add(buf)); 265 eina_stringshare_add(buf));
266 return eina_stringshare_add(buf); 266 return eina_stringshare_add(buf);
@@ -278,10 +278,10 @@ e_path_find(E_Path *ep, const char *file)
278 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file); 278 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file);
279 if (ecore_file_exists(buf)) 279 if (ecore_file_exists(buf))
280 { 280 {
281 if (eina_hash_population(ep->hash) >= 512)
282 _e_path_cache_free(ep);
283 if (!ep->hash) 281 if (!ep->hash)
284 ep->hash = eina_hash_string_superfast_new(NULL); 282 ep->hash = eina_hash_string_superfast_new(NULL);
283 if (eina_hash_population(ep->hash) >= 512)
284 _e_path_cache_free(ep);
285 eina_hash_add(ep->hash, file, 285 eina_hash_add(ep->hash, file,
286 eina_stringshare_add(buf)); 286 eina_stringshare_add(buf));
287 return eina_stringshare_add(buf); 287 return eina_stringshare_add(buf);