From 101845b2c3153f417f90e1c2809154187bfc9e54 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 5 Nov 2004 23:43:14 +0000 Subject: [PATCH] Fix bug caused by previous change. --- src/lib/kernel/list.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/kernel/list.c b/src/lib/kernel/list.c index 1735576..ba4fae6 100644 --- a/src/lib/kernel/list.c +++ b/src/lib/kernel/list.c @@ -232,8 +232,9 @@ list_remove (list_elem *elem) list_elem * list_pop_front (struct list *list) { - ASSERT (list != NULL); - return list_remove (list_front (list)); + list_elem *front = list_front (list); + list_remove (front); + return front; } /* Removes the back element from LIST and returns it. @@ -241,8 +242,9 @@ list_pop_front (struct list *list) list_elem * list_pop_back (struct list *list) { - ASSERT (list != NULL); - return list_remove (list_back (list)); + list_elem *back = list_back (list); + list_remove (back); + return back; } /* Returns the front element in LIST. -- 2.30.2