src/utils_cache.c: Initialize the mutex correctly.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 28 Oct 2007 19:07:28 +0000 (20:07 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 28 Oct 2007 19:07:28 +0000 (20:07 +0100)
src/utils_cache.c

index 79989a0..9349a1f 100644 (file)
@@ -37,7 +37,7 @@ typedef struct cache_entry_s
 } cache_entry_t;
 
 static avl_tree_t     *cache_tree = NULL;
 } cache_entry_t;
 
 static avl_tree_t     *cache_tree = NULL;
-static pthread_mutex_t cache_lock;
+static pthread_mutex_t cache_lock = PTHREAD_MUTEX_INITIALIZER;
 
 static int cache_compare (const cache_entry_t *a, const cache_entry_t *b)
 {
 
 static int cache_compare (const cache_entry_t *a, const cache_entry_t *b)
 {