mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Simplify new macro, simplify configfile logic, now that list is sorted
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -712,15 +712,12 @@ struct { \
|
||||
prev = cur; \
|
||||
cur = cur->field.next; \
|
||||
} \
|
||||
if (!prev) { /* Same as INSERT_HEAD */ \
|
||||
(elm)->field.next = (head)->first; \
|
||||
(head)->first = (elm); \
|
||||
} else if (!cur) { /* Same as INSERT_TAIL */ \
|
||||
(head)->last->field.next = (elm); \
|
||||
(head)->last = (elm); \
|
||||
if (!prev) { \
|
||||
AST_LIST_INSERT_HEAD(head, elm, field); \
|
||||
} else if (!cur) { \
|
||||
AST_LIST_INSERT_TAIL(head, elm, field); \
|
||||
} else { \
|
||||
(elm)->field.next = cur; \
|
||||
(prev)->field.next = (elm); \
|
||||
AST_LIST_INSERT_AFTER(head, prev, elm, field); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
Reference in New Issue
Block a user