Module Name:    src
Committed By:   kre
Date:           Fri Jun 15 08:17:38 UTC 2018

Modified Files:
        src/sys/compat/sys: time_types.h

Log Message:
Revert previous, mrg's fix is better (even with possible namespace issues,
which I guess are not great in compat includes) .... the perils of two
people doing fixes at around the same time.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/sys/time_types.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/compat/sys/time_types.h
diff -u src/sys/compat/sys/time_types.h:1.4 src/sys/compat/sys/time_types.h:1.5
--- src/sys/compat/sys/time_types.h:1.4	Fri Jun 15 07:46:59 2018
+++ src/sys/compat/sys/time_types.h	Fri Jun 15 08:17:38 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: time_types.h,v 1.4 2018/06/15 07:46:59 kre Exp $	*/
+/*	$NetBSD: time_types.h,v 1.5 2018/06/15 08:17:38 kre Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -97,7 +97,7 @@ static __inline void timespec_to_timespe
     struct timespec50 *ts50)
 {
 #if INT32_MAX < LONG_MAX	/* scrub padding */
-	memset(ts50, 0, sizeof(struct timespec50));
+	memset(ts50, 0, offsetof(struct timespec50, tv_nsec));
 #endif
 	ts50->tv_sec = (int32_t)ts->tv_sec;
 	ts50->tv_nsec = ts->tv_nsec;

Reply via email to