]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup: Remove assert in cgroup_strerror()
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Mon, 4 Jan 2010 12:34:42 +0000 (18:04 +0530)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Mon, 4 Jan 2010 15:04:57 +0000 (20:34 +0530)
Since we add new errors after ECGSENTINEL, it makes no
sense to have the assert in place. Remove the assert.

Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
src/api.c

index 863df33e99aaf30f7310c57739872f6d5063c46b..967a48e023e3f2bda89fddcff5e389d5e587c4b5 100644 (file)
--- a/src/api.c
+++ b/src/api.c
@@ -106,6 +106,7 @@ char *cgroup_strerror_codes[] = {
        "Cgroup, rules file does not exist",
        "Cgroup mounting failed",
        "The config file can not be opened",
+       "Sentinel"
        "End of File or iterator",
 };
 
@@ -2496,7 +2497,6 @@ cleanup_path:
 
 char *cgroup_strerror(int code)
 {
-       assert((code >= ECGROUPNOTCOMPILED) && (code < ECGSENTINEL));
        if (code == ECGOTHER) {
                return strerror_r(cgroup_get_last_errno(), errtext, MAXLEN);
        }