cgroup: add the missing setting of variable's value

set the value of variable "r" to the return value
of cg_set_attribute.
This commit is contained in:
Gao feng
2013-09-13 14:32:14 +02:00
committed by Lennart Poettering
parent a5e41bdb72
commit 15b4a7548f
+1 -1
View File
@@ -264,7 +264,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r));
sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit);
cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf);
r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf);
if (r < 0)
log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r));
}