Don't bother calling AST_RWLIST_EMPTY on a list before AST_RWLIST_TRAVERSE, it's...
authorJoshua Colp <jcolp@digium.com>
Mon, 23 Jul 2007 23:05:18 +0000 (23:05 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 23 Jul 2007 23:05:18 +0000 (23:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76710 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 43f825f..9239b60 100644 (file)
@@ -2657,10 +2657,8 @@ int __manager_event(int category, const char *event,
        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);