2008-02-28 Paul Jakma <paul.jakma@sun.com>
* linklist.c: This implementation expects that the data pointer not
be null, e.g. listgetdata() asserts this. The list add methods
don't apply the same sanity check.
Noted by Jim Carlson in bug #437.
+2008-02-28 Paul Jakma <paul.jakma@sun.com>
+
+ * linklist.c: This implementation expects that the data pointer not
+ be null, e.g. listgetdata() asserts this. The list add methods
+ don't apply the same sanity check.
+
+ Noted by Jim Carlson in bug #437.
+
2008-01-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* zebra.h: Revert previous change, no need to include <net/if_media.h>
listnode_add (struct list *list, void *val)
{
struct listnode *node;
-
+
+ assert (val != NULL);
+
node = listnode_new ();
node->prev = list->tail;
{
struct listnode *n;
struct listnode *new;
-
+
+ assert (val != NULL);
+
new = listnode_new ();
new->data = val;
listnode_add_after (struct list *list, struct listnode *pp, void *val)
{
struct listnode *nn;
-
+
+ assert (val != NULL);
+
nn = listnode_new ();
nn->data = val;
list_add_node_prev (struct list *list, struct listnode *current, void *val)
{
struct listnode *node;
-
+
+ assert (val != NULL);
+
node = listnode_new ();
node->next = current;
node->data = val;
list_add_node_next (struct list *list, struct listnode *current, void *val)
{
struct listnode *node;
-
+
+ assert (val != NULL);
+
node = listnode_new ();
node->prev = current;
node->data = val;