forked from enlightenment/efl
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
This commit is contained in:
parent
f3c01a9a6c
commit
fd48be23c2
|
@ -1113,8 +1113,10 @@ eina_file_init(void)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
if (getenv("EINA_STATGEN")) _eina_statgen = 1;
|
||||
eina_spinlock_new(&_eina_statgen_lock);
|
||||
eina_spinlock_take(&_eina_statgen_lock);
|
||||
if (getenv("EINA_STATGEN")) _eina_statgen = 1;
|
||||
eina_spinlock_release(&_eina_statgen_lock);
|
||||
eina_lock_recursive_new(&_eina_file_lock_cache);
|
||||
eina_magic_string_set(EINA_FILE_MAGIC, "Eina_File");
|
||||
|
||||
|
|
Loading…
Reference in New Issue