From: Joel Rosdahl Date: Sun, 13 May 2012 15:41:03 +0000 (+0200) Subject: Use UINT_MAX instead of (unsigned)-1 X-Git-Tag: v3.2~138 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34645904f761d20ed62d427f35b89b741b7db090;p=thirdparty%2Fccache.git Use UINT_MAX instead of (unsigned)-1 --- diff --git a/conf.c b/conf.c index 5dcd640a5..d9fb78f13 100644 --- a/conf.c +++ b/conf.c @@ -142,7 +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)(unsigned)-1 && *str != '\0' + if (errno == 0 && x >= 0 && x <= (long)UINT_MAX && *str != '\0' && *endptr == '\0') { *value = x; return true;