From: Fabian Keil <fk@fabiankeil.de>
Date: Thu, 4 Feb 2021 18:05:35 +0000 (+0100)
Subject: list_is_valid(): Remove '#if 1' block around the function body
X-Git-Tag: v_3_0_32~75
X-Git-Url: http://www.privoxy.org/gitweb/user-manual/static/faq/static/gitweb.js?a=commitdiff_plain;h=10c420ef62525822f110df4a2fc768584534c83b;p=privoxy.git

list_is_valid(): Remove '#if 1' block around the function body

The function can be disabled by compiling with NDEBUG now.
---

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 */