From: Willy Tarreau Date: Thu, 24 Jan 2013 15:25:38 +0000 (+0100) Subject: CLEANUP: config: maxcompcpuusage is never negative X-Git-Tag: v1.5-dev18~108 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb2699a15231f429b301fffb4278a092dc9c0a85;p=thirdparty%2Fhaproxy.git CLEANUP: config: maxcompcpuusage is never negative No need to check for a negative value in the "maxcompcpuusage" argument, it's an unsigned int. Reported-by: Dinko Korunic --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 5b8fc0697f..175e30cdc8 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -902,7 +902,7 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) goto out; } compress_min_idle = 100 - atoi(args[1]); - if (compress_min_idle < 0 || compress_min_idle > 100) { + if (compress_min_idle > 100) { Alert("parsing [%s:%d] : '%s' expects an integer argument between 0 and 100.\n", file, linenum, args[0]); err_code |= ERR_ALERT | ERR_FATAL; goto out;