Module Name:    src
Committed By:   maya
Date:           Tue Jan 17 13:13:07 UTC 2017

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

Log Message:
define constants as being wider than int when needed, instead of casting
them at use. makes compilers happier.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 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.77 src/sys/sys/time.h:1.78
--- src/sys/sys/time.h:1.77	Fri Jan  6 03:33:19 2017
+++ src/sys/sys/time.h	Tue Jan 17 13:13:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: time.h,v 1.77 2017/01/06 03:33:19 pgoyette Exp $	*/
+/*	$NetBSD: time.h,v 1.78 2017/01/17 13:13:07 maya Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -177,7 +177,7 @@ bintime2timespec(const struct bintime *b
 
 	ts->tv_sec = bt->sec;
 	ts->tv_nsec =
-	    (long)(((uint64_t)1000000000 * (uint32_t)(bt->frac >> 32)) >> 32);
+	    (long)((1000000000ULL * (uint32_t)(bt->frac >> 32)) >> 32);
 }
 
 static __inline void
@@ -194,7 +194,7 @@ bintime2timeval(const struct bintime *bt
 
 	tv->tv_sec = bt->sec;
 	tv->tv_usec =
-	    (suseconds_t)(((uint64_t)1000000 * (uint32_t)(bt->frac >> 32)) >> 32);
+	    (suseconds_t)((1000000UL * (uint32_t)(bt->frac >> 32)) >> 32);
 }
 
 static __inline void

Reply via email to