From: darkcoven Date: Sun, 31 Jan 2016 15:38:24 +0000 (+0100) Subject: Cli: fix bug when trying to disable DHCP X-Git-Url: https://git.sur5r.net/?p=ngadmin;a=commitdiff_plain;h=65d89de5956fcc53017719eddc3f4a6a1c38a2c2 Cli: fix bug when trying to disable DHCP 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. --- diff --git a/cli/src/com_netconf.c b/cli/src/com_netconf.c index 277d750..9831be7 100644 --- a/cli/src/com_netconf.c +++ b/cli/src/com_netconf.c @@ -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;