Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/hid Use unsigned to avoid undefined behavior. Found ...



details:   https://anonhg.NetBSD.org/src/rev/504b31f0e0e0
branches:  trunk
changeset: 1008023:504b31f0e0e0
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sun Mar 08 14:09:32 2020 +0000

description:
Use unsigned to avoid undefined behavior. Found by kUBSan.

diffstat:

 sys/dev/hid/hid.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r b2f2301b597e -r 504b31f0e0e0 sys/dev/hid/hid.h
--- a/sys/dev/hid/hid.h Sun Mar 08 09:05:33 2020 +0000
+++ b/sys/dev/hid/hid.h Sun Mar 08 14:09:32 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hid.h,v 1.4 2020/03/02 18:15:28 christos Exp $ */
+/*     $NetBSD: hid.h,v 1.5 2020/03/08 14:09:32 msaitoh Exp $  */
 /*     $FreeBSD: src/sys/dev/usb/hid.h,v 1.7 1999/11/17 22:33:40 n_hibma Exp $ */
 
 /*
@@ -123,8 +123,8 @@
 #define HUP_CAMERA_CONTROL     0x0090
 #define HUP_ARCADE             0x0091
 #define HUP_VENDOR             0x00ff
-#define HUP_FIDO               0xf1d0
-#define HUP_MICROSOFT          0xff00
+#define HUP_FIDO               0xf1d0U
+#define HUP_MICROSOFT          0xff00U
 /* XXX compat */
 #define HUP_APPLE              0x00ff
 #define HUP_WACOM              0xff00



Home | Main Index | Thread Index | Old Index