From c8a1e0531d7ccdce5f76aec8a5b6147c686d3403 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 8 Apr 2025 10:49:18 -0400 Subject: fix old checkout --- kernel/old/list.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'kernel/old/list.c') diff --git a/kernel/old/list.c b/kernel/old/list.c index 5492615..084000a 100644 --- a/kernel/old/list.c +++ b/kernel/old/list.c @@ -29,11 +29,11 @@ ** @param[in,out] list The address of a list_t variable ** @param[in] data The data to prepend to the list */ -void list_add(list_t *list, void *data) -{ +void list_add( list_t *list, void *data ) { + // sanity checks - assert1(list != NULL); - assert1(data != NULL); + assert1( list != NULL ); + assert1( data != NULL ); list_t *tmp = (list_t *)data; tmp->next = list->next; @@ -49,15 +49,16 @@ void list_add(list_t *list, void *data) ** ** @return a pointer to the removed data, or NULL if the list was empty */ -void *list_remove(list_t *list) -{ - assert1(list != NULL); +void *list_remove( list_t *list ) { + + assert1( list != NULL ); list_t *data = list->next; - if (data != NULL) { + if( data != NULL ) { list->next = data->next; data->next = NULL; } return (void *)data; } + -- cgit v1.2.3-freya