]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use UINT_MAX instead of (unsigned)-1
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 13 May 2012 15:41:03 +0000 (17:41 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 13 May 2012 15:41:03 +0000 (17:41 +0200)
conf.c

diff --git a/conf.c b/conf.c
index 5dcd640a5992b5acb2481784a922650578008915..d9fb78f139cb83ebbac8ca5029d95590c00781ec 100644 (file)
--- 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;