Unverified Commit 9cdb97e5 by Christian Brauner Committed by Stéphane Graber

confile: do not check for empty value twice

parent dc7ae814
......@@ -1100,9 +1100,7 @@ static int set_config_network_ipv4_gateway(const char *key, const char *value,
free(netdev->ipv4_gateway);
if (lxc_config_value_empty(value)) {
netdev->ipv4_gateway = NULL;
} else if (!strcmp(value, "auto")) {
if (!strcmp(value, "auto")) {
netdev->ipv4_gateway = NULL;
netdev->ipv4_gateway_auto = true;
} else {
......@@ -1202,9 +1200,7 @@ static int set_config_network_ipv6_gateway(const char *key, const char *value,
free(netdev->ipv6_gateway);
if (lxc_config_value_empty(value)) {
netdev->ipv6_gateway = NULL;
} else if (!strcmp(value, "auto")) {
if (!strcmp(value, "auto")) {
netdev->ipv6_gateway = NULL;
netdev->ipv6_gateway_auto = true;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment