From 7e7e70b55e5cccb08f40453bbdc0a909e2714aa8 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Tue, 23 Jul 2024 02:34:29 +0200 Subject: [PATCH] server/netget.c: fix use of "#if DEBUG" when it is not defined [#266] Signed-off-by: Jim Klimov --- server/netget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/netget.c b/server/netget.c index c49510e276..93856a841a 100644 --- a/server/netget.c +++ b/server/netget.c @@ -140,7 +140,7 @@ static void get_type(nut_ctype_t *client, const char *upsname, const char *var) snprintf(buf, sizeof(buf), "TYPE %s %s", upsname, var); if (node->flags & ST_FLAG_IMMUTABLE) { -#if DEBUG +#if defined DEBUG && DEBUG /* Properly exposing this needs also an update to * docs/net-protocol.txt (promote the paragraph * provided as a note currently) and to the NUT RFC @@ -205,7 +205,7 @@ static void get_type(nut_ctype_t *client, const char *upsname, const char *var) } } -#if DEBUG +#if defined DEBUG && DEBUG /* Need to figure out an "aux" value here (length of current * string at least?) and propagate the flag into where netset * would see it. Maybe this sanity-check should move into the