From f66150042e8779b48f041a67aae9dc0742fca7f0 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 4 Feb 2016 14:34:11 +0000 Subject: [PATCH] captivectrl: Move sure that the settings are always initialised This just removes a compiler warning. Signed-off-by: Michael Tremer --- src/misc-progs/captivectrl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/misc-progs/captivectrl.c b/src/misc-progs/captivectrl.c index 1ca2a5911..9479bc6a5 100644 --- a/src/misc-progs/captivectrl.c +++ b/src/misc-progs/captivectrl.c @@ -288,17 +288,20 @@ int main(int argc, char** argv) { char* intf = NULL; client_t* clients = NULL; + struct keyvalue* captive_portal_settings = NULL; + struct keyvalue* ethernet_settings = NULL; + if (!(initsetuid())) exit(2); - struct keyvalue* ethernet_settings = initkeyvalues(); + ethernet_settings = initkeyvalues(); if (!readkeyvalues(ethernet_settings, ETHERNET_SETTINGS)) { fprintf(stderr, "Could not read %s\n", ETHERNET_SETTINGS); r = 1; goto END; } - struct keyvalue* captive_portal_settings = initkeyvalues(); + captive_portal_settings = initkeyvalues(); if (!readkeyvalues(captive_portal_settings, CAPTIVE_PORTAL_SETTINGS)) { fprintf(stderr, "Could not read %s\n", CAPTIVE_PORTAL_SETTINGS); r = 1; -- 2.39.2