[Initng-svn] r4044 - initng/trunk/src

svn at initng.thinktux.net svn at initng.thinktux.net
Sun May 7 19:44:35 CEST 2006


Author: makomk
Date: Sun May  7 19:44:32 2006
New Revision: 4044

Modified:
   initng/trunk/src/initng_list.h

Log:
Fix problems including initng_list.h from C++ programs. Closes #642


Modified: initng/trunk/src/initng_list.h
==============================================================================
--- initng/trunk/src/initng_list.h	(original)
+++ initng/trunk/src/initng_list.h	Sun May  7 19:44:32 2006
@@ -38,46 +38,46 @@
  * This is only for internal list manipulation where we know
  * the prev/next entries already!
  */
-static inline void __list_add(struct list_head *new, struct list_head *prev,
+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;
 }
 
 /**
  * list_add - add a new entry
- * @new: new entry to be added
+ * @newe: new entry to be added
  * @head: list head to add it after
  *
  * 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)
 {
 	/* make sure its not already added */
-	if (new->next || new->prev)
+	if (newe->next || newe->prev)
 		return;
-	__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,
+static inline void list_add_tail(struct list_head *newe,
 								 struct list_head *head)
 {
 	/* make sure its not already added */
-	if (new->next || new->prev)
+	if (newe->next || newe->prev)
 		return;
-	__list_add(new, head->prev, head);
+	__list_add(newe, head->prev, head);
 }
 
 /*
@@ -104,8 +104,8 @@
 	if (entry->next || entry->prev)
 	{
 		__list_del(entry->prev, entry->next);
-		entry->next = (void *) 0;
-		entry->prev = (void *) 0;
+		entry->next = (struct list_head *) 0;
+		entry->prev = (struct list_head *) 0;
 	}
 }
 


More information about the Initng-svn mailing list