From b10049c907ebe110e440b698e534bee2012826da Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sat, 17 Oct 2026 10:36:25 +0300
Subject: [PATCH 40/40] kick_command(): Use macros instead of const variables

Fixes gnu-folding-constant warning

See RM #2355

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 server/stdinhand.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/server/stdinhand.c b/server/stdinhand.c
index 3006efec43..6548818f91 100644
--- a/server/stdinhand.c
+++ b/server/stdinhand.c
@@ -6351,7 +6351,9 @@ static bool kick_command(struct connection *caller, char *name, bool check)
   }
 
   if (NULL != caller && ALLOW_ADMIN > conn_get_access(caller)) {
-    const int MIN_UNIQUE_CONNS = 3;
+
+#define MIN_UNIQUE_CONNS 3
+
     const char *unique_ipaddr[MIN_UNIQUE_CONNS];
     int i, num_unique_connections = 0;
 
@@ -6385,6 +6387,8 @@ static bool kick_command(struct connection *caller, char *name, bool check)
     }
   }
 
+#undef MIN_UNIQUE_CONNS
+
   if (check) {
     return TRUE;
   }
-- 
2.53.0

