lxccontainer: use correct error checks

parent cae16593
...@@ -3295,7 +3295,7 @@ static bool do_lxcapi_set_cgroup_item(struct lxc_container *c, const char *subsy ...@@ -3295,7 +3295,7 @@ static bool do_lxcapi_set_cgroup_item(struct lxc_container *c, const char *subsy
return false; return false;
ret = cgroup_set(c->name, c->config_path, subsys, value); ret = cgroup_set(c->name, c->config_path, subsys, value);
if (ret == ENOCGROUP2) { if (ret == -ENOCGROUP2) {
cgroup_ops = cgroup_init(c->lxc_conf); cgroup_ops = cgroup_init(c->lxc_conf);
if (!cgroup_ops) if (!cgroup_ops)
return false; return false;
...@@ -3320,7 +3320,7 @@ static int do_lxcapi_get_cgroup_item(struct lxc_container *c, const char *subsys ...@@ -3320,7 +3320,7 @@ static int do_lxcapi_get_cgroup_item(struct lxc_container *c, const char *subsys
return -1; return -1;
ret = cgroup_get(c->name, c->config_path, subsys, retv, inlen); ret = cgroup_get(c->name, c->config_path, subsys, retv, inlen);
if (ret == ENOCGROUP2) { if (ret == -ENOCGROUP2) {
cgroup_ops = cgroup_init(c->lxc_conf); cgroup_ops = cgroup_init(c->lxc_conf);
if (!cgroup_ops) if (!cgroup_ops)
return -1; return -1;
......
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