conf: improve lxc_clear_cgroups()

parent 15970277
...@@ -3684,7 +3684,7 @@ int lxc_clear_cgroups(struct lxc_conf *c, const char *key, int version) ...@@ -3684,7 +3684,7 @@ int lxc_clear_cgroups(struct lxc_conf *c, const char *key, int version)
namespaced_token_len = STRLITERALLEN("lxc.cgroup."); namespaced_token_len = STRLITERALLEN("lxc.cgroup.");
list = &c->cgroup; list = &c->cgroup;
} else { } else {
return -EINVAL; return ret_errno(EINVAL);
} }
if (strequal(key, global_token)) if (strequal(key, global_token))
...@@ -3692,7 +3692,7 @@ int lxc_clear_cgroups(struct lxc_conf *c, const char *key, int version) ...@@ -3692,7 +3692,7 @@ int lxc_clear_cgroups(struct lxc_conf *c, const char *key, int version)
else if (strnequal(key, namespaced_token, namespaced_token_len)) else if (strnequal(key, namespaced_token, namespaced_token_len))
k += namespaced_token_len; k += namespaced_token_len;
else else
return -EINVAL; return ret_errno(EINVAL);
lxc_list_for_each_safe (it, list, next) { lxc_list_for_each_safe (it, list, next) {
struct lxc_cgroup *cg = it->elem; struct lxc_cgroup *cg = it->elem;
......
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