git: 28f6910714e3 - main - net/route: properly brace the RT_LOG() macro

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Thu, 19 Oct 2023 05:22:07 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=28f6910714e32138fa2b2950a22aac91c04bd053

commit 28f6910714e32138fa2b2950a22aac91c04bd053
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2023-10-19 05:21:53 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2023-10-19 05:21:53 +0000

    net/route: properly brace the RT_LOG() macro
---
 sys/net/route/route_debug.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys/net/route/route_debug.h b/sys/net/route/route_debug.h
index b00fbf1784e7..1e682bd4561b 100644
--- a/sys/net/route/route_debug.h
+++ b/sys/net/route/route_debug.h
@@ -107,10 +107,11 @@ SYSCTL_DECL(_net_route_debug);
  * Example: [nhop_neigh] nhops_update_neigh: L2 prepend update from lle/inet/valid/vtnet0/10.0.0.157
  */
 #define	RT_LOG(_l, _fmt, ...)	RT_LOG_##_l(_l, _fmt, ## __VA_ARGS__)
-#define	_RT_LOG(_l, _fmt, ...)	if (_DEBUG_PASS_MSG(_l)) {	\
-	_output("[" DEBUG_PREFIX_NAME "] %s: " _fmt "\n",  __func__, ##__VA_ARGS__);	\
-}
-
+#define	_RT_LOG(_l, _fmt, ...)	do {					\
+	if (_DEBUG_PASS_MSG(_l))					\
+		_output("[" DEBUG_PREFIX_NAME "] %s: " _fmt "\n",	\
+		     __func__, ##__VA_ARGS__);				\
+} while (0)
 
 /*
  * Wrapper logic to avoid compiling high levels of debugging messages for production systems.