]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: cleanup get_config_net_veth_mode()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 18:03:09 +0000 (19:03 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 9 Dec 2020 14:01:46 +0000 (15:01 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index d0034c175054bfc1fc2b1836086dbdd30039a8bf..df2d12eb7e6d5c42de4db36088353b3673d7dd1a 100644 (file)
@@ -5765,10 +5765,10 @@ static int get_config_net_ipvlan_isolation(const char *key, char *retv, int inle
 static int get_config_net_veth_mode(const char *key, char *retv, int inlen,
                                       struct lxc_conf *c, void *data)
 {
-       int len;
        int fulllen = 0;
-       const char *mode;
        struct lxc_netdev *netdev = data;
+       int len;
+       const char *mode;
 
        if (!retv)
                inlen = 0;
@@ -5776,7 +5776,7 @@ static int get_config_net_veth_mode(const char *key, char *retv, int inlen,
                memset(retv, 0, inlen);
 
        if (!netdev)
-               return ret_set_errno(-1, EINVAL);
+               return ret_errno(EINVAL);
 
        if (netdev->type != LXC_NET_VETH)
                return 0;