From 48bf64253686d4a805709d1e82e4d8d4fc64fdf7 Mon Sep 17 00:00:00 2001 From: Hendrik Rauh <114620133+HendrikRauh@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:22:10 +0100 Subject: [PATCH] NULL should not be used here passing NULL to non-pointer argument fixed --- src/routes/config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/config.cpp b/src/routes/config.cpp index d586feb..53aafce 100644 --- a/src/routes/config.cpp +++ b/src/routes/config.cpp @@ -78,7 +78,7 @@ void onGetConfig(AsyncWebServerRequest *request) IPAddress ip = config.getUInt("ip", DEFAULT_IP); IPAddress subnet = config.getUInt("subnet", DEFAULT_SUBNET); - IPAddress gateway = config.getUInt("gateway", NULL); + IPAddress gateway = config.getUInt("gateway", 0); JsonDocument doc; doc["connection"] = config.getUInt("connection", DEFAULT_CONNECTION); @@ -87,7 +87,7 @@ void onGetConfig(AsyncWebServerRequest *request) doc["ip-method"] = config.getUInt("ip-method", DEFAULT_IP_METHOD); doc["ip"] = ip.toString(); doc["subnet"] = subnet.toString(); - doc["gateway"] = gateway != NULL ? gateway.toString() : ""; + doc["gateway"] = gateway != 0 ? gateway.toString() : ""; doc["universe-1"] = config.getUInt("universe-1", DEFAULT_UNIVERSE1); doc["direction-1"] = config.getUInt("direction-1", DEFAULT_DIRECTION1); doc["universe-2"] = config.getUInt("universe-2", DEFAULT_UNIVERSE2);