aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/kernel/list.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/kernel/list.c b/src/lib/kernel/list.c
index e9993cb..8b02162 100644
--- a/src/lib/kernel/list.c
+++ b/src/lib/kernel/list.c
@@ -1,5 +1,11 @@
#include "list.h"
+#ifdef PINTOS
#include "../debug.h"
+#else
+#define UNUSED __attribute__ ((unused))
+#define ASSERT(...) assert(__VA_ARGS__)
+#include <assert.h>
+#endif
/* Our doubly linked lists have two header elements: the "head"
just before the first element and the "tail" just after the
@@ -463,7 +469,7 @@ list_insert_ordered (struct list *list, struct list_elem *elem,
for (e = list_begin (list); e != list_end (list); e = list_next (e))
if (less (elem, e, aux))
break;
- return list_insert (e, elem);
+ list_insert (e, elem);
}
/* Iterates through LIST and removes all but the first in each