From 298fd0771278850cf923f5fab5a17ac6f8e0d1a2 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 9 Jun 1993 11:47:01 +0000 Subject: [PATCH] Prevent warning about overflow --- lang/cem/libcc.ansi/stdlib/strtol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/cem/libcc.ansi/stdlib/strtol.c b/lang/cem/libcc.ansi/stdlib/strtol.c index 152af9303..da040ab1a 100644 --- a/lang/cem/libcc.ansi/stdlib/strtol.c +++ b/lang/cem/libcc.ansi/stdlib/strtol.c @@ -80,7 +80,7 @@ string2long(register const char *nptr, char ** const endptr, * unsigned long. */ if (is_signed - && ( (sign < 0 && val > -LONG_MIN) + && ( (sign < 0 && val > -(LONG_MIN+1)+(unsigned long) 1) || (sign > 0 && val > LONG_MAX))) ovfl++; }