]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
portability: Don't compare signed and unsigned integers
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 17 Apr 2012 21:23:35 +0000 (23:23 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 17 Apr 2012 21:23:35 +0000 (23:23 +0200)
conf.c

diff --git a/conf.c b/conf.c
index 6c248534e30aa0364ecc99289a9495e5bdcb419c..5dcd640a5992b5acb2481784a922650578008915 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 <= (unsigned)-1 && *str != '\0'
+       if (errno == 0 && x >= 0 && x <= (long)(unsigned)-1 && *str != '\0'
            && *endptr == '\0') {
                *value = x;
                return true;