Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
struct hierarchy *h;
int ret = -1;
- if (!ops || !key || !value || !name || !lxcpath)
- return ret_errno(ENOENT);
+ if (!ops || is_empty_string(key) || is_empty_string(value) ||
+ is_empty_string(name) || is_empty_string(lxcpath))
+ return ret_errno(EINVAL);
controller = must_copy_string(key);
p = strchr(controller, '.');
if (!cgroup_ops)
return false;
- ret = cgroup_ops->set(cgroup_ops, subsys, value, c->name, c->config_path) == 0;
+ ret = cgroup_ops->set(cgroup_ops, subsys, value, c->name, c->config_path);
}
return ret == 0;