Module Name:    src
Committed By:   christos
Date:           Thu Dec 24 15:53:06 UTC 2015

Modified Files:
        src/sys/sys: time.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/sys/time.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/time.h
diff -u src/sys/sys/time.h:1.70 src/sys/sys/time.h:1.71
--- src/sys/sys/time.h:1.70	Fri Jul 31 08:51:32 2015
+++ src/sys/sys/time.h	Thu Dec 24 10:53:06 2015
@@ -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 @@ ms2bintime(uint64_t ms)
 {
 	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 @@ us2bintime(uint64_t us)
 {
 	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 @@ ns2bintime(uint64_t ns)
 {
 	struct bintime bt;
 
-	bt.sec = ns / 1000000000U;
+	bt.sec = (time_t)(ns / 1000000000U);
 	bt.frac = (((ns % 1000000000U) >> 32)/1000000000U) >> 32;
 
 	return bt;

Reply via email to