From 04075cdef04e50b80651a27c5a1573eff0658cc4 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Fri, 27 Feb 2009 14:53:53 +0000 Subject: Rename symbol new Change the symbol 'new' to an alternative. The symbol new is reserved for C++ compilers. Signed-off-by: Geoff Levand --- lib/list/list.c | 20 ++++++++++---------- lib/list/list.h | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/list') diff --git a/lib/list/list.c b/lib/list/list.c index b781bc6..9b33561 100644 --- a/lib/list/list.c +++ b/lib/list/list.c @@ -7,20 +7,20 @@ void list_init(struct list *list) list->head.prev = &list->head; } -void list_insert_before(struct list_item *next, struct list_item *new) +void list_insert_before(struct list_item *next, struct list_item *item) { - new->next = next; - new->prev = next->prev; - next->prev->next = new; - next->prev = new; + item->next = next; + item->prev = next->prev; + next->prev->next = item; + next->prev = item; } -void list_insert_after(struct list_item *prev, struct list_item *new) +void list_insert_after(struct list_item *prev, struct list_item *item) { - new->next = prev->next; - new->prev = prev; - prev->next->prev = new; - prev->next = new; + item->next = prev->next; + item->prev = prev; + prev->next->prev = item; + prev->next = item; } void list_remove(struct list_item *item) diff --git a/lib/list/list.h b/lib/list/list.h index 27b57fc..53080a0 100644 --- a/lib/list/list.h +++ b/lib/list/list.h @@ -35,17 +35,17 @@ struct list { _pos = list_entry(_pos->_member.next, typeof(*_pos), _member)) void list_init(struct list *list); -void list_insert_before(struct list_item *next, struct list_item *new); -void list_insert_after(struct list_item *prev, struct list_item *new); +void list_insert_before(struct list_item *next, struct list_item *item); +void list_insert_after(struct list_item *prev, struct list_item *item); void list_remove(struct list_item *item); -static inline void list_add(struct list *list, struct list_item *new) +static inline void list_add(struct list *list, struct list_item *item) { - list_insert_after(&list->head, new); + list_insert_after(&list->head, item); } -static inline void list_add_tail(struct list *list, struct list_item *new) +static inline void list_add_tail(struct list *list, struct list_item *item) { - list_insert_before(&list->head, new); + list_insert_before(&list->head, item); } #endif /* _LIST_H */ -- cgit v1.2.1