[svn-commits] trunk r25891 - /trunk/res/res_monitor.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue May 9 00:28:01 MST 2006


Author: russell
Date: Tue May  9 02:28:01 2006
New Revision: 25891

URL: http://svn.digium.com/view/asterisk?rev=25891&view=rev
Log:
remove a check of the result of ast_mutex_lock

Modified:
    trunk/res/res_monitor.c

Modified: trunk/res/res_monitor.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_monitor.c?rev=25891&r1=25890&r2=25891&view=diff
==============================================================================
--- trunk/res/res_monitor.c (original)
+++ trunk/res/res_monitor.c Tue May  9 02:28:01 2006
@@ -50,22 +50,15 @@
 
 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)
 
-#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;
 



More information about the svn-commits mailing list