This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 4/7] Correct a misplaced closing paren.


From: ian <ian@FreeBSD.org>

Does not affect the result, but does clarify (at least for me) that the
multiplication happens before the shift.
---
 newlib/libc/include/sys/time.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h
index 0dfdbfea4..e5023ae64 100644
--- a/newlib/libc/include/sys/time.h
+++ b/newlib/libc/include/sys/time.h
@@ -183,7 +183,7 @@ static __inline sbintime_t
 nstosbt(int64_t _ns)
 {
 
-	return ((_ns * (((uint64_t)1 << 63) / 500000000) >> 32));
+	return ((_ns * (((uint64_t)1 << 63) / 500000000)) >> 32);
 }
 
 static __inline int64_t
@@ -197,7 +197,7 @@ static __inline sbintime_t
 ustosbt(int64_t _us)
 {
 
-	return ((_us * (((uint64_t)1 << 63) / 500000) >> 32));
+	return ((_us * (((uint64_t)1 << 63) / 500000)) >> 32);
 }
 
 static __inline int64_t
@@ -211,7 +211,7 @@ static __inline sbintime_t
 mstosbt(int64_t _ms)
 {
 
-	return ((_ms * (((uint64_t)1 << 63) / 500) >> 32));
+	return ((_ms * (((uint64_t)1 << 63) / 500)) >> 32);
 }
 
 /*-
-- 
2.16.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]