]> git.ozlabs.org Git - petitboot/commitdiff
Rename symbol new
authorGeoff Levand <geoffrey.levand@am.sony.com>
Fri, 27 Feb 2009 14:53:53 +0000 (14:53 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 23 Mar 2009 10:47:17 +0000 (21:47 +1100)
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>
lib/list/list.c
lib/list/list.h

index b781bc65ac4fb5d04e11979f8a4dfe10cb25690e..9b33561cbe891c6d3e014bd163e67868067fb736 100644 (file)
@@ -7,20 +7,20 @@ void list_init(struct list *list)
        list->head.prev = &list->head;
 }
 
        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)
 }
 
 void list_remove(struct list_item *item)
index 27b57fc752bc3ecd99f6206e3af64a4098ff2685..53080a034a16bf34dc9042d085f81016f6823864 100644 (file)
@@ -35,17 +35,17 @@ struct list {
                _pos = list_entry(_pos->_member.next, typeof(*_pos), _member))
 
 void list_init(struct list *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);
 
 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 */
 }
 
 #endif /* _LIST_H */