]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: do not check for empty value twice 1632/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Jun 2017 09:13:57 +0000 (11:13 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Jun 2017 09:13:57 +0000 (11:13 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 0b0335fffbd8454a16ab2c3c9d7a58117048b4c9..97583f7f75bd5840c0e74f17a27fc1b37e4ccd99 100644 (file)
@@ -1101,9 +1101,7 @@ static int set_config_net_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 {
@@ -1211,9 +1209,7 @@ static int set_config_net_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 {