mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
captivectrl: Move sure that the settings are always initialised
This just removes a compiler warning. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user