summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-11-10 23:29:55 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-11-10 23:29:55 +0000
commitc73cab28138e055d84dcdcbb16d39e9b3cb03e5c (patch)
tree35dfa26de306786e6581b23e237173f1654244de
parentbdf5417eaad505f5c31eabd869ee03755319c90b (diff)
downloadrtems-c73cab28138e055d84dcdcbb16d39e9b3cb03e5c.tar.bz2
2009-11-10 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1468/cpukit * score/src/timespecdividebyinteger.c: Rework statement to ensure 64-bit multiplication is used.
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/score/src/timespecdividebyinteger.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 91a0477e31..f517340b57 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,11 @@
2009-11-10 Jennifer Averett <jennifer.averett@OARcorp.com>
+ PR 1468/cpukit
+ * score/src/timespecdividebyinteger.c: Rework statement to ensure
+ 64-bit multiplication is used.
+
+2009-11-10 Jennifer Averett <jennifer.averett@OARcorp.com>
+
PR 1462/cpukit
* rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemonperiod.c: Fine
tune previous patch after analysis in application.
diff --git a/cpukit/score/src/timespecdividebyinteger.c b/cpukit/score/src/timespecdividebyinteger.c
index eecd7c4e30..34a719a577 100644
--- a/cpukit/score/src/timespecdividebyinteger.c
+++ b/cpukit/score/src/timespecdividebyinteger.c
@@ -34,7 +34,8 @@ void _Timespec_Divide_by_integer(
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
- t = time->tv_sec * TOD_NANOSECONDS_PER_SECOND;
+ t = time->tv_sec;
+ t *= TOD_NANOSECONDS_PER_SECOND;
t += time->tv_nsec;
/*