remove a check of the result of ast_mutex_lock
authorRussell Bryant <russell@russellbryant.com>
Tue, 9 May 2006 07:28:01 +0000 (07:28 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 9 May 2006 07:28:01 +0000 (07:28 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25891 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_monitor.c

index c5c8102..4f47a65 100644 (file)
@@ -50,22 +50,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 AST_MUTEX_DEFINE_STATIC(monitorlock);
 
 
 AST_MUTEX_DEFINE_STATIC(monitorlock);
 
-#define LOCK_IF_NEEDED(lock, needed)                                                           \
-       do {                                                                                                                    \
-               if (needed) {                                                                                           \
-                       if (ast_mutex_lock(lock)) {                                                             \
-                               ast_log(LOG_WARNING, "Unable to lock channel\n");       \
-                               return -1;                                                                                      \
-                       }                                                                                                               \
-               }                                                                                                                       \
+#define LOCK_IF_NEEDED(lock, needed) do { \
+       if (needed) \
+               ast_mutex_lock(lock); \
        } while(0)
 
        } while(0)
 
-#define UNLOCK_IF_NEEDED(lock, needed)                 \
-       do {                                                                            \
-               if (needed) {                                                   \
-                       ast_mutex_unlock(lock);                         \
-               }                                                                               \
-       } while(0)                                                                      \
+#define UNLOCK_IF_NEEDED(lock, needed) do { \
+       if (needed) \
+               ast_mutex_unlock(lock); \
+       } while (0)
 
 static unsigned long seq = 0;
 
 
 static unsigned long seq = 0;