Source-Changes-HG archive

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

[src/trunk]: src/sys/sys explicit casts to time_t, since we are going from un...



details:   https://anonhg.NetBSD.org/src/rev/1cc733855657
branches:  trunk
changeset: 342492:1cc733855657
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 24 15:53:06 2015 +0000

description:
explicit casts to time_t, since we are going from unsigned -> signed.

diffstat:

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

diffs (36 lines):

diff -r 98eeda569a4d -r 1cc733855657 sys/sys/time.h
--- a/sys/sys/time.h    Thu Dec 24 15:52:37 2015 +0000
+++ b/sys/sys/time.h    Thu Dec 24 15:53:06 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: time.h,v 1.70 2015/07/31 12:51:32 kamil Exp $  */
+/*     $NetBSD: time.h,v 1.71 2015/12/24 15:53:06 christos Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -199,7 +199,7 @@
 {
        struct bintime bt;
 
-       bt.sec = ms / 1000U;
+       bt.sec = (time_t)(ms / 1000U);
        bt.frac = (((ms % 1000U) >> 32)/1000U) >> 32;
 
        return bt;
@@ -210,7 +210,7 @@
 {
        struct bintime bt;
 
-       bt.sec = us / 1000000U;
+       bt.sec = (time_t)(us / 1000000U);
        bt.frac = (((us % 1000000U) >> 32)/1000000U) >> 32;
 
        return bt;
@@ -221,7 +221,7 @@
 {
        struct bintime bt;
 
-       bt.sec = ns / 1000000000U;
+       bt.sec = (time_t)(ns / 1000000000U);
        bt.frac = (((ns % 1000000000U) >> 32)/1000000000U) >> 32;
 
        return bt;



Home | Main Index | Thread Index | Old Index