From 05ce57efb88253ca59035ab8adc580bb88b0ef9e Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 13 May 2012 18:46:39 +0200 Subject: [PATCH] Avoid checking for too large values in parse_unsigned It's not worth the portability hassle --- conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 { -- 2.47.2