summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-05-28 16:14:28 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-05-28 16:14:28 +0000
commit0b3535d53cb8e5839272f3abecf19053af3f7187 (patch)
tree97ede22e5a1907c1755f7eae4990ed10e28e252f
parent5f1dd02407863999039ca6b1b6e41eefac304d04 (diff)
Fix comparison between signed and unsigned integer. Makes the random
panics during autoconf disappear on the v215. ok dlg@, otto@
-rw-r--r--sys/arch/sparc64/dev/pci_machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c
index ad57f73ccbb..509e6f7c790 100644
--- a/sys/arch/sparc64/dev/pci_machdep.c
+++ b/sys/arch/sparc64/dev/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.28 2007/04/02 18:10:14 kettenis Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.29 2007/05/28 16:14:27 kettenis Exp $ */
/* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */
/*
@@ -392,7 +392,7 @@ pci_intr_map(pa, ihp)
char devtype[30];
len = OF_getproplen(node, "interrupts");
- if (len < sizeof(interrupts)) {
+ if (len < 0 || len < sizeof(interrupts)) {
DPRINTF(SPDB_INTMAP,
("pci_intr_map: interrupts len %d too small\n", len));
return (ENODEV);