From: Dhaval Giani Date: Mon, 4 Jan 2010 12:34:42 +0000 (+0530) Subject: libcgroup: Remove assert in cgroup_strerror() X-Git-Tag: v0.35~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2104d8c20d068dcd927ac4c99b7ddb390eb4f10;p=thirdparty%2Flibcgroup.git libcgroup: Remove assert in cgroup_strerror() 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 --- diff --git a/src/api.c b/src/api.c index 863df33e..967a48e0 100644 --- 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); }