From d08f5be5b090276abfc30c4d289833cbdfb996ff Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 1 Jun 2016 10:14:25 +0000 Subject: Don't use fixup for C99 and up, the compiler result is already correct. Suggested by: bde MFC after: 1 week --- lib/libc/stdlib/div.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libc/stdlib/div.c') diff --git a/lib/libc/stdlib/div.c b/lib/libc/stdlib/div.c index 7dfe553..0bafbe6 100644 --- a/lib/libc/stdlib/div.c +++ b/lib/libc/stdlib/div.c @@ -46,6 +46,7 @@ div(num, denom) r.quot = num / denom; r.rem = num % denom; +#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) /* * The ANSI standard says that |r.quot| <= |n/d|, where * n/d is to be computed in infinite precision. In other @@ -73,5 +74,6 @@ div(num, denom) r.quot++; r.rem -= denom; } +#endif return (r); } -- cgit v1.1