[asterisk-commits] file: trunk r76710 - /trunk/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 23 18:05:19 CDT 2007


Author: file
Date: Mon Jul 23 18:05:18 2007
New Revision: 76710

URL: http://svn.digium.com/view/asterisk?view=rev&rev=76710
Log:
Don't bother calling AST_RWLIST_EMPTY on a list before AST_RWLIST_TRAVERSE, it's just a double check.

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=76710&r1=76709&r2=76710
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Mon Jul 23 18:05:18 2007
@@ -2657,10 +2657,8 @@
 	AST_LIST_UNLOCK(&sessions);
 
 	AST_RWLIST_RDLOCK(&manager_hooks);
-	if (!AST_RWLIST_EMPTY(&manager_hooks)) {
-		AST_RWLIST_TRAVERSE(&manager_hooks, hook, list) {
-			hook->helper(category, event, buf->str);
-		}
+	AST_RWLIST_TRAVERSE(&manager_hooks, hook, list) {
+		hook->helper(category, event, buf->str);
 	}
 	AST_RWLIST_UNLOCK(&manager_hooks);
 




More information about the asterisk-commits mailing list