Merged revisions 15896 via svnmerge from
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 29 Mar 2006 00:32:52 +0000 (00:32 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 29 Mar 2006 00:32:52 +0000 (00:32 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r15896 | kpfleming | 2006-03-28 18:32:10 -0600 (Tue, 28 Mar 2006) | 2 lines

ensure that list traversal loops which skip entries properly update the 'previous entry' pointer so when entries _are_ removed the list does not get damaged

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15897 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/linkedlists.h

index 17d92c5..610f808 100644 (file)
@@ -303,6 +303,7 @@ struct {                                                            \
              __list_next = (var) ? (var)->field.next : NULL;                           \
             (var);                                                                     \
             __list_prev = __new_prev, (var) = __list_next,                             \
+            __new_prev = (var),                                                        \
             __list_next = (var) ? (var)->field.next : NULL                             \
            )