]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: cleanup get_config_net_ipvlan_mode()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 18:02:22 +0000 (19:02 +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 e7034e24daf0a36e6ae096876f065d697364ba0e..d8bfaaa101167be35e37d855ef8bbddabe1fd7a7 100644 (file)
@@ -5687,10 +5687,10 @@ static int get_config_net_macvlan_mode(const char *key, char *retv, int inlen,
 static int get_config_net_ipvlan_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;
@@ -5698,7 +5698,7 @@ static int get_config_net_ipvlan_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_IPVLAN)
                return 0;