]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: cleanup lxc_list_net()
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 9 Dec 2020 08:32:51 +0000 (09:32 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 9 Dec 2020 14:01:48 +0000 (15:01 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 5cae5839be718373b82bba0fbd0e799565af7723..fb047277548293f57da43f62777f364a173161b2 100644 (file)
@@ -6280,11 +6280,11 @@ int lxc_list_net(struct lxc_conf *c, const char *key, char *retv, int inlen)
 
        (void)get_network_config_ops(key, c, &idx, NULL);
        if (idx < 0)
-               return -1;
+               return ret_errno(EINVAL);
 
        netdev = lxc_get_netdev_by_idx(c, (unsigned int)idx, false);
        if (!netdev)
-               return -1;
+               return ret_errno(EINVAL);
 
        if (!retv)
                inlen = 0;