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 <[email protected]>
Signed-off-by: Dhaval Giani <[email protected]>
Acked-By: Jan Safranek <[email protected]>

---
 src/wrapper.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: libcg/src/wrapper.c
===================================================================
--- libcg.orig/src/wrapper.c
+++ libcg/src/wrapper.c
@@ -436,7 +436,7 @@ int cgroup_set_value_int64(struct cgroup
                                        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 cgrou
                                        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_
                                                const char *name, bool value)
 {
        int i;
-       unsigned ret;
+       int ret;
 
        if (!controller)
                return ECGINVAL;



------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to