summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-06-12 23:09:46 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-06-12 23:09:46 +0000
commitaf43358115bd7affb8fb8584b773ded959bfdeb4 (patch)
tree768072e119921e4416379ee454c5783aa97e915a /sys/arch/mvme88k
parent7527e6b7fc8d2092e27fd430693e521879ec4fe6 (diff)
In intr_findvec(), correct the for() loop bounds.
And display barf messages only if option DIAGNOSTIC.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 1ff9de1ff0c..62d9648af10 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.37 2001/06/05 23:07:50 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.38 2001/06/12 23:09:45 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -1492,14 +1492,19 @@ intr_findvec(start, end)
{
int vec;
+#ifdef DIAGNOSTIC
/* Sanity check! */
if (start < 0 || end > 255 || start > end)
panic("intr_findvec(): bad parameters");
- for (vec = start; vec < end; --vec){
+#endif
+
+ for (vec = end; vec > start; --vec){
if (intr_handlers[vec] == NULL)
return (vec);
}
+#ifdef DIAGNOSTIC
printf("intr_findvec(): uh oh....\n", vec);
+#endif
return (-1);
}