]> rtime.felk.cvut.cz Git - ulut.git/commitdiff
Fixes to achieve C++ compatibility
authorwentasah <wentasah>
Tue, 10 Feb 2009 12:36:57 +0000 (12:36 +0000)
committerwentasah <wentasah>
Tue, 10 Feb 2009 12:36:57 +0000 (12:36 +0000)
new is C++ keyword so it cannot be used as a name of identifiers.

ulut/ul_listbase.h

index 2d4feceb37804a3a3175c0f67d83c0abee5af8cc..4e80a13851a715f8e87ac91a1e03b57768399b24 100644 (file)
@@ -7,8 +7,8 @@ extern "C" {
 
 #ifndef __KERNEL__
 
-#define LIST_POISON1  ((void *) 0)
-#define LIST_POISON2  ((void *) 0)
+#define LIST_POISON1  ((struct list_head *) 0)
+#define LIST_POISON2  ((struct list_head *) 0)
 
 /*
  * Simple doubly linked list implementation.
@@ -39,14 +39,14 @@ struct list_head {
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
-static inline void __list_add(struct list_head *new,
+static inline void __list_add(struct list_head *newe,
                              struct list_head *prev,
                              struct list_head *next)
 {
-       next->prev = new;
-       new->next = next;
-       new->prev = prev;
-       prev->next = new;
+       next->prev = newe;
+       newe->next = next;
+       newe->prev = prev;
+       prev->next = newe;
 }
 
 /**
@@ -57,22 +57,22 @@ static inline void __list_add(struct list_head *new,
  * Insert a new entry after the specified head.
  * This is good for implementing stacks.
  */
-static inline void list_add(struct list_head *new, struct list_head *head)
+static inline void list_add(struct list_head *newe, struct list_head *head)
 {
-       __list_add(new, head, head->next);
+       __list_add(newe, head, head->next);
 }
 
 /**
  * list_add_tail - add a new entry
- * @new: new entry to be added
+ * @newe: new entry to be added
  * @head: list head to add it before
  *
  * Insert a new entry before the specified head.
  * This is useful for implementing queues.
  */
-static inline void list_add_tail(struct list_head *new, struct list_head *head)
+static inline void list_add_tail(struct list_head *newe, struct list_head *head)
 {
-       __list_add(new, head->prev, head);
+       __list_add(newe, head->prev, head);
 }
 
 /*