Module Name:    src
Committed By:   kre
Date:           Wed Jul 24 22:32:07 UTC 2024

Modified Files:
        src/sys/net: if_wg.c

Log Message:
While the previous change fixed the broken build, it wasn't the best
way, as defining any of the WG_DEBUG_XXX symbols then effectively
defined all of them - making them as seperate entities, pointless.

So, rearrange the way things are done a little to avoid doing that.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/net/if_wg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_wg.c
diff -u src/sys/net/if_wg.c:1.82 src/sys/net/if_wg.c:1.83
--- src/sys/net/if_wg.c:1.82	Wed Jul 24 22:17:21 2024
+++ src/sys/net/if_wg.c	Wed Jul 24 22:32:07 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wg.c,v 1.82 2024/07/24 22:17:21 kre Exp $	*/
+/*	$NetBSD: if_wg.c,v 1.83 2024/07/24 22:32:07 kre Exp $	*/
 
 /*
  * Copyright (C) Ryota Ozaki <ozaki.ry...@gmail.com>
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.82 2024/07/24 22:17:21 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.83 2024/07/24 22:32:07 kre Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altq_enabled.h"
@@ -169,13 +169,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.
 
 // #define WG_DEBUG
 
-#ifndef WG_DEBUG
-# if defined(WG_DEBUG_LOG) || defined(WG_DEBUG_TRACE) ||		    \
-	defined(WG_DEBUG_DUMP) || defined(WG_DEBUG_PARAMS)
-#   define WG_DEBUG
-# endif
-#endif
-
 /* Debug options */
 #ifdef WG_DEBUG
 /* Output debug logs */
@@ -194,6 +187,16 @@ __KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.
 #ifndef WG_DEBUG_PARAMS
 #define WG_DEBUG_PARAMS
 #endif
+#endif /* WG_DEBUG */
+
+#ifndef WG_DEBUG
+# if defined(WG_DEBUG_LOG) || defined(WG_DEBUG_TRACE) ||		    \
+	defined(WG_DEBUG_DUMP) || defined(WG_DEBUG_PARAMS)
+#   define WG_DEBUG
+# endif
+#endif
+
+#ifdef WG_DEBUG
 int wg_debug;
 #define WG_DEBUG_FLAGS_LOG	1
 #define WG_DEBUG_FLAGS_TRACE	2

Reply via email to