confile: cleanup get_config_net_veth_ipv4_route()

parent a1fd71ed
......@@ -5615,7 +5615,7 @@ static int get_config_net_veth_ipv4_route(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_VETH)
return 0;
......@@ -5624,7 +5624,8 @@ static int get_config_net_veth_ipv4_route(const char *key, char *retv, int inlen
lxc_list_for_each(it, &netdev->priv.veth_attr.ipv4_routes) {
struct lxc_inetdev *i = it->elem;
inet_ntop(AF_INET, &i->addr, buf, sizeof(buf));
if (!inet_ntop(AF_INET, &i->addr, buf, sizeof(buf)))
return -errno;
strprint(retv, inlen, "%s/%u%s", buf, i->prefix,
(listlen-- > 1) ? "\n" : "");
}
......
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