* linklist.{c,h}: (listnode_move_to_tail) new unction to move a
listnode to tail of list.
* ospf_packet.c: (ospf_write) remove debug that seemed to be mostly covered
by existing debug.
Use listnode_move_to_tail to just move the list node to the end of the
tail, rather than freeing the one to hand and allocing a new one.
list->count++;
}
+/* Move given listnode to tail of the list */
+void
+listnode_move_to_tail (struct list *l, struct listnode *n)
+{
+ LISTNODE_DETACH(l,n);
+ LISTNODE_ATTACH(l,n);
+}
/* Delete specific date pointer from the list. */
void
extern void listnode_add (struct list *, void *);
extern void listnode_add_sort (struct list *, void *);
extern void listnode_add_after (struct list *, struct listnode *, void *);
+extern void listnode_move_to_tail (struct list *, struct listnode *);
extern void listnode_delete (struct list *, void *);
extern struct listnode *listnode_lookup (struct list *, void *);
extern void *listnode_head (struct list *);