]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: cleanup get_config_net_ipvlan_isolation()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 18:02:47 +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 d8bfaaa101167be35e37d855ef8bbddabe1fd7a7..d0034c175054bfc1fc2b1836086dbdd30039a8bf 100644 (file)
@@ -5726,10 +5726,10 @@ static int get_config_net_ipvlan_mode(const char *key, char *retv, int inlen,
 static int get_config_net_ipvlan_isolation(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;
@@ -5737,7 +5737,7 @@ static int get_config_net_ipvlan_isolation(const char *key, char *retv, int inle
                memset(retv, 0, inlen);
 
        if (!netdev)
-               return ret_set_errno(-1, EINVAL);
+               return ret_errno(EINVAL);
 
        if (netdev->type != LXC_NET_IPVLAN)
                return 0;