From: Christian Brauner Date: Wed, 9 Dec 2020 08:32:51 +0000 (+0100) Subject: confile: cleanup lxc_list_net() X-Git-Tag: lxc-5.0.0~330^2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17f781b35fd06a6287fb194f8f1756028c612191;p=thirdparty%2Flxc.git confile: cleanup lxc_list_net() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 5cae5839b..fb0472775 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -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;