confile: cleanup lxc_list_net()

parent 1a24c7a9
......@@ -5834,11 +5834,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment