Re: An alternative to USE_TRUNCATE_NOT_UNLINK, efficient and without race conditions.

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 24 May 1999 06:16:08 +0000

Henrik Nordstrom wrote:

Small but crucial bug in the insert functions.. (excuse: typed it
online..)

> void list_add_head(struct list_entry *e, struct list *l) {
> e->prev = NULL;
> e->next = l->list_head;
+ l->list_head->prev = e
> l->list_head = e;
> }
>
> void list_add_tail(struct list_entry *e, struct list *l) {
> e->next = NULL;
> e->prev = l->list_tail;
+ l->list_tail->next = e;
> l->list_tail = e;
> }

/Henrik
Received on Tue Jul 29 2003 - 13:15:58 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:08 MST