summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-10 23:25:07 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-11 12:47:38 +0100
commitfd48be23c2c51343b709dc78b889f93199b7ee61 (patch)
tree0024484bb0de1450b7092ac0b1b7a71c1c0b71d7 /src/lib/eina
parentf3c01a9a6c157230d03156b221d690e003284e70 (diff)
eina file - make coverity happy and lock+unlock on init
coverity doesnt like inconsistent behavior of code, so make it consistent even if pointless as this is during init when we wont have threads .... yet. CID 1403903
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_file_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c
index 9369cb2..331a971 100644
--- a/src/lib/eina/eina_file_common.c
+++ b/src/lib/eina/eina_file_common.c
@@ -1113,8 +1113,10 @@ eina_file_init(void)
1113 return EINA_FALSE; 1113 return EINA_FALSE;
1114 } 1114 }
1115 1115
1116 if (getenv("EINA_STATGEN")) _eina_statgen = 1;
1117 eina_spinlock_new(&_eina_statgen_lock); 1116 eina_spinlock_new(&_eina_statgen_lock);
1117 eina_spinlock_take(&_eina_statgen_lock);
1118 if (getenv("EINA_STATGEN")) _eina_statgen = 1;
1119 eina_spinlock_release(&_eina_statgen_lock);
1118 eina_lock_recursive_new(&_eina_file_lock_cache); 1120 eina_lock_recursive_new(&_eina_file_lock_cache);
1119 eina_magic_string_set(EINA_FILE_MAGIC, "Eina_File"); 1121 eina_magic_string_set(EINA_FILE_MAGIC, "Eina_File");
1120 1122