summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2012-03-08 17:00:22 +0000
committerSean Bright <sean@malleable.com>2012-03-08 17:00:22 +0000
commita8116350bc47069650de7d08353d8c1c6d6bfe4b (patch)
tree510b1481645b7460631c6c65a216b113f003e43e
parent587cb230b27f2858101965c6fc54b82c27cdd9c6 (diff)
Add some underscores in a few of our llist macros to reduce name collisions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--include/asterisk/linkedlists.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h
index 9977dbe0c..215df74b8 100644
--- a/include/asterisk/linkedlists.h
+++ b/include/asterisk/linkedlists.h
@@ -747,24 +747,24 @@ struct { \
* \param sortfield Name of the field on which the list is sorted
* \since 1.6.1
*/
-#define AST_LIST_INSERT_SORTALPHA(head, elm, field, sortfield) do { \
- if (!(head)->first) { \
- (head)->first = (elm); \
- (head)->last = (elm); \
- } else { \
- typeof((head)->first) cur = (head)->first, prev = NULL; \
- while (cur && strcmp(cur->sortfield, elm->sortfield) < 0) { \
- prev = cur; \
- cur = cur->field.next; \
- } \
- if (!prev) { \
- AST_LIST_INSERT_HEAD(head, elm, field); \
- } else if (!cur) { \
- AST_LIST_INSERT_TAIL(head, elm, field); \
- } else { \
- AST_LIST_INSERT_AFTER(head, prev, elm, field); \
- } \
- } \
+#define AST_LIST_INSERT_SORTALPHA(head, elm, field, sortfield) do { \
+ if (!(head)->first) { \
+ (head)->first = (elm); \
+ (head)->last = (elm); \
+ } else { \
+ typeof((head)->first) __cur = (head)->first, __prev = NULL; \
+ while (__cur && strcmp(__cur->sortfield, elm->sortfield) < 0) { \
+ __prev = __cur; \
+ __cur = __cur->field.next; \
+ } \
+ if (!__prev) { \
+ AST_LIST_INSERT_HEAD(head, elm, field); \
+ } else if (!__cur) { \
+ AST_LIST_INSERT_TAIL(head, elm, field); \
+ } else { \
+ AST_LIST_INSERT_AFTER(head, __prev, elm, field); \
+ } \
+ } \
} while (0)
#define AST_RWLIST_INSERT_SORTALPHA AST_LIST_INSERT_SORTALPHA
@@ -830,14 +830,14 @@ struct { \
* This macro is safe to call on an empty list.
*/
#define AST_LIST_REMOVE_HEAD(head, field) ({ \
- typeof((head)->first) cur = (head)->first; \
- if (cur) { \
- (head)->first = cur->field.next; \
- cur->field.next = NULL; \
- if ((head)->last == cur) \
+ typeof((head)->first) __cur = (head)->first; \
+ if (__cur) { \
+ (head)->first = __cur->field.next; \
+ __cur->field.next = NULL; \
+ if ((head)->last == __cur) \
(head)->last = NULL; \
} \
- cur; \
+ __cur; \
})
#define AST_RWLIST_REMOVE_HEAD AST_LIST_REMOVE_HEAD