aboutsummaryrefslogtreecommitdiffstats
path: root/module/spl/spl-time.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-05-23 09:51:17 -0700
committerBrian Behlendorf <[email protected]>2010-05-23 09:51:17 -0700
commit8a1c9a02fb66ac5885990ec4d82faf03f820085b (patch)
tree8060a6a55fb81ea90cb1d2b80422bf8e871e898a /module/spl/spl-time.c
parent49638d838846b551f033037c2ff13368e6fdd166 (diff)
Minor 32-bit fix cast to hrtime_t before the mutliply.
It's important to cast to hrtime_t before doing the multiply because the ts.tv_sec type is only 32-bits and we need to promote it to 64-bits.
Diffstat (limited to 'module/spl/spl-time.c')
-rw-r--r--module/spl/spl-time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/spl/spl-time.c b/module/spl/spl-time.c
index 4c08b754d..6ef9b8fc8 100644
--- a/module/spl/spl-time.c
+++ b/module/spl/spl-time.c
@@ -63,7 +63,7 @@ __gethrtime(void) {
struct timespec ts;
do_posix_clock_monotonic_gettime(&ts);
- return (hrtime_t)((ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
+ return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec);
#endif
}
EXPORT_SYMBOL(__gethrtime);