Skip to content
Snippets Groups Projects
Commit ccf51018 authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix linked lists tail (bug #951)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent eb97ef73
Branches
Tags
No related merge requests found
......@@ -55,10 +55,14 @@ struct { \
#define AST_LIST_INSERT_TAIL(head, elm, type, field) do { \
struct type *curelm = (head)->first; \
while ( curelm->field.next!=NULL ) { \
curelm=curelm->field.next; \
if(!curelm) { \
AST_LIST_INSERT_HEAD(head, elm, field); \
} else { \
while ( curelm->field.next!=NULL ) { \
curelm=curelm->field.next; \
} \
AST_LIST_INSERT_AFTER(curelm,elm,field); \
} \
AST_LIST_INSERT_AFTER(curelm,elm,field); \
} while (0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment