diff options
author | steve <steve@FreeBSD.org> | 1997-08-23 23:51:12 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1997-08-23 23:51:12 +0000 |
commit | fc8b5b4955e847d86a82903f1e573bba3a391e5b (patch) | |
tree | 93ed9d1488be4da25ddc614356143e45a2039c15 /lib/libc/stdlib/strtoll.c | |
parent | c75d58a28c83f1cdf5f39f4c4e2fb22b04012fe1 (diff) | |
download | FreeBSD-src-fc8b5b4955e847d86a82903f1e573bba3a391e5b.zip FreeBSD-src-fc8b5b4955e847d86a82903f1e573bba3a391e5b.tar.gz |
Get rid of integer overflow warning.
PR: misc/3575
Submitted by: Bruce Evans <bde@zeta.org.au>
Diffstat (limited to 'lib/libc/stdlib/strtoll.c')
-rw-r--r-- | lib/libc/stdlib/strtoll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/strtoll.c b/lib/libc/stdlib/strtoll.c index 2666749..f84e030 100644 --- a/lib/libc/stdlib/strtoll.c +++ b/lib/libc/stdlib/strtoll.c @@ -105,7 +105,7 @@ strtoq(nptr, endptr, base) * overflow. */ qbase = (unsigned)base; - cutoff = neg ? -(u_quad_t)QUAD_MIN : QUAD_MAX; + cutoff = neg ? (u_quad_t)-(QUAD_MIN + QUAD_MAX) + QUAD_MAX : QUAD_MAX; cutlim = cutoff % qbase; cutoff /= qbase; for (acc = 0, any = 0;; c = *s++) { |