Module Name:    src
Committed By:   pgoyette
Date:           Wed Jun 13 02:29:56 UTC 2018

Modified Files:
        src/sys/dev/wscons [pgoyette-compat]: wsevent_50.c

Log Message:
Keep up with -HEAD


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/dev/wscons/wsevent_50.c

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

Modified files:

Index: src/sys/dev/wscons/wsevent_50.c
diff -u src/sys/dev/wscons/wsevent_50.c:1.1.2.1 src/sys/dev/wscons/wsevent_50.c:1.1.2.2
--- src/sys/dev/wscons/wsevent_50.c:1.1.2.1	Sat Mar 24 23:52:19 2018
+++ src/sys/dev/wscons/wsevent_50.c	Wed Jun 13 02:29:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: wsevent_50.c,v 1.1.2.1 2018/03/24 23:52:19 pgoyette Exp $ */
+/* $NetBSD: wsevent_50.c,v 1.1.2.2 2018/06/13 02:29:56 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2006, 2008 The NetBSD Foundation, Inc.
@@ -104,7 +104,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsevent_50.c,v 1.1.2.1 2018/03/24 23:52:19 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsevent_50.c,v 1.1.2.2 2018/06/13 02:29:56 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -134,6 +134,9 @@ wsevent_copyout_events50(const struct ws
 
 		ev50.type = ev->type;
 		ev50.value = ev->value;
+#if INT32_MAX < LONG_MAX	/* scrub padding */
+		memset(&ev50.time, 0, offsetof(struct timespec50, tv_nsec));
+#endif
 		timespec_to_timespec50(&ev->time, &ev50.time);
 
 		error = uiomove(&ev50, sizeof(ev50), uio);

Reply via email to