diff options
author | Richard Mudgett <rmudgett@digium.com> | 2011-10-29 04:31:51 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2011-10-29 04:31:51 +0000 |
commit | f7ce570c350a4e8cc86532148b194b7f5886bb1e (patch) | |
tree | c52e5b6fff50f43e3171c141c78b720892b0c8b9 /include | |
parent | 849992fde929425bde434bf18d192947193bfca9 (diff) |
Fix AST_LIST_INSERT_BEFORE_CURRENT() updating the wrong variable.
AST_LIST_INSERT_BEFORE_CURRENT() could not be used twice in an iteration
or before AST_LIST_REMOVE_CURRENT() without corrupting the list.
AST_LIST_INSERT_BEFORE_CURRENT() could also corrupt the list if
AST_LIST_INSERT_BEFORE_CURRENT() or AST_LIST_REMOVE_CURRENT() is used on
the next iteration.
* Fixed cut and paste error using the wrong variable in
AST_LIST_INSERT_BEFORE_CURRENT().
* Added linked list unit tests for AST_LIST_INSERT_BEFORE_CURRENT(),
AST_LIST_APPEND_LIST(), and AST_LIST_INSERT_LIST_AFTER().
........
Merged revisions 342661 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 342662 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/linkedlists.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h index 4c9e27b28..0da56b09f 100644 --- a/include/asterisk/linkedlists.h +++ b/include/asterisk/linkedlists.h @@ -589,7 +589,7 @@ struct { \ (elm)->field.next = __list_head->first; \ __list_head->first = (elm); \ } \ - __new_prev = (elm); \ + __list_prev = (elm); \ } while (0) #define AST_RWLIST_INSERT_BEFORE_CURRENT AST_LIST_INSERT_BEFORE_CURRENT |