Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys As pointed out by christos@, since the macros alread...



details:   https://anonhg.NetBSD.org/src/rev/e99c3b9893ba
branches:  trunk
changeset: 820288:e99c3b9893ba
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Jan 06 03:33:19 2017 +0000

description:
As pointed out by christos@, since the macros already include a cast
to uint64_t, it's not necessary to cast again at point of use.

diffstat:

 sys/sys/time.h |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r b158375b1b02 -r e99c3b9893ba sys/sys/time.h
--- a/sys/sys/time.h    Fri Jan 06 03:25:13 2017 +0000
+++ b/sys/sys/time.h    Fri Jan 06 03:33:19 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: time.h,v 1.76 2017/01/05 23:24:39 pgoyette Exp $       */
+/*     $NetBSD: time.h,v 1.77 2017/01/06 03:33:19 pgoyette Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -185,7 +185,7 @@
 {
 
        bt->sec = ts->tv_sec;
-       bt->frac = (uint64_t)ts->tv_nsec * (uint64_t)BINTIME_SCALE_NS;
+       bt->frac = (uint64_t)ts->tv_nsec * BINTIME_SCALE_NS;
 }
 
 static __inline void
@@ -202,7 +202,7 @@
 {
 
        bt->sec = tv->tv_sec;
-       bt->frac = (uint64_t)tv->tv_usec * (uint64_t)BINTIME_SCALE_US;
+       bt->frac = (uint64_t)tv->tv_usec * BINTIME_SCALE_US;
 }
 
 static __inline struct bintime
@@ -211,7 +211,7 @@
        struct bintime bt;
 
        bt.sec = (time_t)(ms / 1000U);
-       bt.frac = (uint64_t)(ms % 1000U) * (uint64_t)BINTIME_SCALE_MS;
+       bt.frac = (uint64_t)(ms % 1000U) * BINTIME_SCALE_MS;
 
        return bt;
 }
@@ -222,7 +222,7 @@
        struct bintime bt;
 
        bt.sec = (time_t)(us / 1000000U);
-       bt.frac = (uint64_t)(us % 1000000U) * (uint64_t)BINTIME_SCALE_US;
+       bt.frac = (uint64_t)(us % 1000000U) * BINTIME_SCALE_US;
 
        return bt;
 }
@@ -233,7 +233,7 @@
        struct bintime bt;
 
        bt.sec = (time_t)(ns / 1000000000U);
-       bt.frac = (uint64_t)(ns % 1000000000U) * (uint64_t)BINTIME_SCALE_NS;
+       bt.frac = (uint64_t)(ns % 1000000000U) * BINTIME_SCALE_NS;
 
        return bt;
 }



Home | Main Index | Thread Index | Old Index