Module Name: src
Committed By: msaitoh
Date: Tue Oct 15 18:20:44 UTC 2019
Modified Files:
src/sys/dev/pci: pccbbreg.h
Log Message:
Use unsigned to avoid undefined behavior. Found by kUBSan.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/pccbbreg.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/dev/pci/pccbbreg.h
diff -u src/sys/dev/pci/pccbbreg.h:1.15 src/sys/dev/pci/pccbbreg.h:1.16
--- src/sys/dev/pci/pccbbreg.h:1.15 Tue Dec 15 22:17:12 2009
+++ src/sys/dev/pci/pccbbreg.h Tue Oct 15 18:20:44 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: pccbbreg.h,v 1.15 2009/12/15 22:17:12 snj Exp $ */
+/* $NetBSD: pccbbreg.h,v 1.16 2019/10/15 18:20:44 msaitoh Exp $ */
/*
* Copyright (c) 1999 HAYAKAWA Koichi. All rights reserved.
@@ -67,7 +67,7 @@
/* PCI_CB_LSCP_REG */
#define PCI_CB_LATENCY_SHIFT 24
-#define PCI_CB_LATENCY_MASK 0xff
+#define PCI_CB_LATENCY_MASK 0xffU
#define PCI_CB_LATENCY(x) (((x) >> PCI_CB_LATENCY_SHIFT) & PCI_CB_LATENCY_MASK)