From 10c420ef62525822f110df4a2fc768584534c83b Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 4 Feb 2021 19:05:35 +0100 Subject: [PATCH] list_is_valid(): Remove '#if 1' block around the function body The function can be disabled by compiling with NDEBUG now. --- list.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/list.c b/list.c index fe9c41e5..a2d7ff6b 100644 --- a/list.c +++ b/list.c @@ -144,11 +144,6 @@ void destroy_list (struct list *the_list) *********************************************************************/ static int list_is_valid (const struct list *the_list) { - /* - * If you don't want this check, just change the line below - * from "#if 1" to "#if 0". - */ -#if 1 const struct list_entry *cur_entry; const struct list_entry *last_entry = NULL; int entry = 0; @@ -201,9 +196,7 @@ static int list_is_valid (const struct list *the_list) } return (the_list->last == last_entry); -#else - return 1; -#endif + } #endif /* ndef NDEBUG */ -- 2.39.2