About func in lists.c
Zheng Yuan {ZYUAN1}
zyuan1 at cig.mot.com
Sat Jan 13 00:36:21 CET 2001
Hi, all
i have a question about func as bellows
/**
* add_head - prepend a node to a list
* @l: linked list
* @n: list node
*
* add_head() takes a node @n and prepends it at the start of the list @l.
*/ LIST_INLINE void add_head(list *l, node *n) {
node *z = l->head;
n->next = z;
n->prev = (node *) &l->head;
z->prev = n;
l->head = n; }
isnt that we should change n->prev = (node *) &l->head to n->prev = (node
*) &l->null
More information about the Bird-users
mailing list