summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-16 20:44:39 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-16 20:44:39 +0000
commit495cf41f6b059a37a297b431d6360c3454f2bac0 (patch)
tree7d875f2730612879ddeed38e6faf850f882a24bf /sys/arch
parentb52f43cc3f762b9fb198cacf71681a934baec544 (diff)
Fix range check in sgc_slottopa().
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/dev/sgc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/hp300/dev/sgc.c b/sys/arch/hp300/dev/sgc.c
index 6b4115590ea..92e083a0827 100644
--- a/sys/arch/hp300/dev/sgc.c
+++ b/sys/arch/hp300/dev/sgc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgc.c,v 1.2 2005/01/23 00:03:10 miod Exp $ */
+/* $OpenBSD: sgc.c,v 1.3 2006/06/16 20:44:38 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat
@@ -132,7 +132,7 @@ sgc_slottopa(int slot)
{
u_long rval;
- if (slot < 0 || slot > SGC_NSLOTS)
+ if (slot < 0 || slot >= SGC_NSLOTS)
rval = 0;
else
rval = SGC_BASE + (slot * SGC_DEVSIZE);