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/branches/1.2@15896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-03-29 00:32:10 +00:00
parent 70bd3bebc5
commit 8d1c316519

View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
* Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
* Kevin P. Fleming <kpfleming@digium.com>
@@ -279,6 +279,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 \
)