From f9003d89b17c039ab903f622580e61925e137523 Mon Sep 17 00:00:00 2001 From: klaar36 Date: Mon, 20 Mar 2017 17:59:45 +0100 Subject: added given files for standalone labs --- src/lib/kernel/list.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lib/kernel/list.c') 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 +#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 -- cgit v1.2.1