diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2009-02-27 14:53:53 +0000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2009-03-23 21:47:17 +1100 |
commit | 04075cdef04e50b80651a27c5a1573eff0658cc4 (patch) | |
tree | 6ccc78b195c674d3f39b81d384ace0d7c57482e1 /lib | |
parent | a582671979c7b20436f9e993eda90452f7223f3c (diff) | |
download | petitboot-04075cdef04e50b80651a27c5a1573eff0658cc4.zip petitboot-04075cdef04e50b80651a27c5a1573eff0658cc4.tar.gz |
Rename symbol new
Change the symbol 'new' to an alternative. The symbol new is
reserved for C++ compilers.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/list/list.c | 20 | ||||
-rw-r--r-- | lib/list/list.h | 12 |
2 files changed, 16 insertions, 16 deletions
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 */ |