From: Joel Rosdahl Date: Sun, 13 May 2012 16:46:39 +0000 (+0200) Subject: Avoid checking for too large values in parse_unsigned X-Git-Tag: v3.2~137 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05ce57e;p=thirdparty%2Fccache.git Avoid checking for too large values in parse_unsigned It's not worth the portability hassle --- diff --git a/conf.c b/conf.c index d9fb78f13..a971b6f14 100644 --- a/conf.c +++ b/conf.c @@ -142,8 +142,7 @@ parse_unsigned(const char *str, void *result, char **errmsg) char *endptr; errno = 0; x = strtol(str, &endptr, 10); - if (errno == 0 && x >= 0 && x <= (long)UINT_MAX && *str != '\0' - && *endptr == '\0') { + if (errno == 0 && x >= 0 && *str != '\0' && *endptr == '\0') { *value = x; return true; } else {