From 064dd8648d18f5f17d881b5f020ec03d615ac26a Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sat, 17 Oct 2026 10:36:25 +0300
Subject: [PATCH 79/79] 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 998c47d8a6..9979209a39 100644
--- a/server/stdinhand.c
+++ b/server/stdinhand.c
@@ -6361,7 +6361,9 @@ static bool kick_command(struct connection *caller, char *name, bool check)
   }
 
   if (caller != nullptr && 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;
 
@@ -6395,6 +6397,8 @@ static bool kick_command(struct connection *caller, char *name, bool check)
     }
   }
 
+#undef MIN_UNIQUE_CONNS
+
   if (check) {
     return TRUE;
   }
-- 
2.53.0

