From: Dhaval Giani Date: Tue, 16 Nov 2010 13:29:47 +0000 (+0100) Subject: v2 [patch 2/6] wrapper.c: correct the return types X-Git-Tag: v0.37~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0dd39197e0bb89d843e715bd438a30eefa7cd70;p=thirdparty%2Flibcgroup.git v2 [patch 2/6] wrapper.c: correct the return types Steve Grubb was kind enough to do a review at http://article.gmane.org/gmane.comp.lib.libcg.devel/2485 and pointed out that we were checking for unsigned values to be negative. That is of course wrong, and we need to actually be checking integers. Correct the return type so that the check is valid once more. Reported-by: Steve Grubb Signed-off-by: Dhaval Giani Acked-By: Jan Safranek --- diff --git a/src/wrapper.c b/src/wrapper.c index 83c0030c..4828ea8b 100644 --- a/src/wrapper.c +++ b/src/wrapper.c @@ -436,7 +436,7 @@ int cgroup_set_value_int64(struct cgroup_controller *controller, const char *name, int64_t value) { int i; - unsigned ret; + int ret; if (!controller) return ECGINVAL; @@ -484,7 +484,7 @@ int cgroup_set_value_uint64(struct cgroup_controller *controller, const char *name, u_int64_t value) { int i; - unsigned ret; + int ret; if (!controller) return ECGINVAL; @@ -538,7 +538,7 @@ int cgroup_set_value_bool(struct cgroup_controller *controller, const char *name, bool value) { int i; - unsigned ret; + int ret; if (!controller) return ECGINVAL;