]> git.ipfire.org Git - people/dweismueller/ipfire-2.x.git/commitdiff
captivectrl: Move sure that the settings are always initialised
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 4 Feb 2016 14:34:11 +0000 (14:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 14 Dec 2016 13:00:13 +0000 (14:00 +0100)
This just removes a compiler warning.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/misc-progs/captivectrl.c

index 1ca2a59117d110ba4843a93af0fd4b0768688303..9479bc6a54d4691dac597a5c575952800d9c6886 100644 (file)
@@ -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;