]> git.sur5r.net Git - ngadmin/commitdiff
Cli: fix bug when trying to disable DHCP
authordarkcoven <admin@darkcoven.tk>
Sun, 31 Jan 2016 15:38:24 +0000 (16:38 +0100)
committerdarkcoven <admin@darkcoven.tk>
Sun, 31 Jan 2016 15:38:24 +0000 (16:38 +0100)
This was introduced by commit b4e57a27716c76f833c6b5a6fef61252c0f5471e, which
was about converting return code of functions from bool to int.
Unfortunately, the s/false/1/ used for that caused an unwanted replacement.

cli/src/com_netconf.c

index 277d750c5fb1e561fb06811687a07c5de23d0d52..9831be76e324734c7249e1bebb3cb9e1b6809b1e 100644 (file)
@@ -55,7 +55,7 @@ int do_netconf_set (int argc, const char **argv, struct ngadmin *nga)
                        if (strcasecmp(argv[k + 1], "yes") == 0) {
                                nc.dhcp = true;
                        } else if (strcasecmp(argv[k + 1], "no") == 0) {
-                               nc.dhcp = 1;
+                               nc.dhcp = false;
                        } else {
                                printf("Incorrect DHCP value\n");
                                ret = 1;