Prevent warning about overflow

This commit is contained in:
ceriel 1993-06-09 11:47:01 +00:00
parent 5e31863838
commit 298fd07712

View file

@ -80,7 +80,7 @@ string2long(register const char *nptr, char ** const endptr,
* unsigned long. * unsigned long.
*/ */
if (is_signed if (is_signed
&& ( (sign < 0 && val > -LONG_MIN) && ( (sign < 0 && val > -(LONG_MIN+1)+(unsigned long) 1)
|| (sign > 0 && val > LONG_MAX))) || (sign > 0 && val > LONG_MAX)))
ovfl++; ovfl++;
} }