Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 correct wrong casting. some are consider...
details: https://anonhg.NetBSD.org/src/rev/00037292939a
branches: trunk
changeset: 348881:00037292939a
user: rin <rin%NetBSD.org@localhost>
date: Sun Nov 13 13:59:45 2016 +0000
description:
correct wrong casting. some are considered harmless, but
- tv_sec in netbsd32_timeval is netbsd32_time_t (aka netbsd32_int64_t)
rather than time_t (int64_t)
- tv_sec in netbsd32_timespec is netbsd32_time_t rather than
netbsd32_long (y2038 problem)
approved by martin
diffstat:
sys/compat/netbsd32/netbsd32_conv.h | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (65 lines):
diff -r 1db9a6d47733 -r 00037292939a sys/compat/netbsd32/netbsd32_conv.h
--- a/sys/compat/netbsd32/netbsd32_conv.h Sun Nov 13 13:52:41 2016 +0000
+++ b/sys/compat/netbsd32/netbsd32_conv.h Sun Nov 13 13:59:45 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_conv.h,v 1.30 2015/06/22 10:35:00 mrg Exp $ */
+/* $NetBSD: netbsd32_conv.h,v 1.31 2016/11/13 13:59:45 rin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -63,7 +63,7 @@
struct netbsd32_timeval50 *tv32)
{
- tv32->tv_sec = (netbsd32_long)tv->tv_sec;
+ tv32->tv_sec = (netbsd32_time50_t)tv->tv_sec;
tv32->tv_usec = (netbsd32_long)tv->tv_usec;
}
@@ -72,8 +72,8 @@
struct netbsd32_timeval *tv32)
{
- tv32->tv_sec = (time_t)tv->tv_sec;
- tv32->tv_usec = (suseconds_t)tv->tv_usec;
+ tv32->tv_sec = (netbsd32_time_t)tv->tv_sec;
+ tv32->tv_usec = tv->tv_usec;
}
static __inline void
@@ -82,7 +82,7 @@
{
tv->tv_sec = (time_t)tv32->tv_sec;
- tv->tv_usec = (suseconds_t)tv32->tv_usec;
+ tv->tv_usec = tv32->tv_usec;
}
static __inline void
@@ -91,7 +91,7 @@
{
tv->tv_sec = (time_t)tv32->tv_sec;
- tv->tv_usec = (suseconds_t)tv32->tv_usec;
+ tv->tv_usec = tv32->tv_usec;
}
static __inline void
@@ -157,7 +157,7 @@
struct netbsd32_timespec50 *s32p)
{
- s32p->tv_sec = (netbsd32_long)p->tv_sec;
+ s32p->tv_sec = (netbsd32_time50_t)p->tv_sec;
s32p->tv_nsec = (netbsd32_long)p->tv_nsec;
}
@@ -166,7 +166,7 @@
struct netbsd32_timespec *s32p)
{
- s32p->tv_sec = (netbsd32_long)p->tv_sec;
+ s32p->tv_sec = (netbsd32_time_t)p->tv_sec;
s32p->tv_nsec = (netbsd32_long)p->tv_nsec;
}
Home |
Main Index |
Thread Index |
Old Index