Fix little macro (bug #3100)
[asterisk/asterisk.git] / include / asterisk / linkedlists.h
index b752b3a..75f0aa2 100755 (executable)
@@ -1,14 +1,13 @@
 #ifndef ASTERISK_LINKEDLISTS_H
 #define ASTERISK_LINKEDLISTS_H
 
-#include <pthread.h>
 #include <asterisk/lock.h>
 
 #define AST_LIST_LOCK(head)                                            \
-       ast_mutex_lock(&head->lock) 
+       ast_mutex_lock(&(head)->lock) 
        
 #define AST_LIST_UNLOCK(head)                                          \
-       ast_mutex_unlock(&head->lock)
+       ast_mutex_unlock(&(head)->lock)
 
 #define AST_LIST_HEAD(name, type)                                      \
 struct name {                                                          \