summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-04-05 21:49:34 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-04-05 21:49:34 +0000
commit154ee2ca0eaeca9814d1534147df62863dc55bd0 (patch)
tree2ff792843b1edcabf3acc08741cff1403f6e6983
parent03916b7c6416f88d9f83623dce630a576c4e8988 (diff)
Off-by-ones in register comparisons.
-rw-r--r--sys/arch/sparc64/dev/creator.c4
-rw-r--r--sys/arch/sparc64/dev/creator_mainbus.c4
-rw-r--r--sys/arch/sparc64/dev/creator_upa.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/sparc64/dev/creator.c b/sys/arch/sparc64/dev/creator.c
index 03172058173..faf40df544f 100644
--- a/sys/arch/sparc64/dev/creator.c
+++ b/sys/arch/sparc64/dev/creator.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: creator.c,v 1.33 2005/03/15 18:40:15 miod Exp $ */
+/* $OpenBSD: creator.c,v 1.34 2005/04/05 21:49:33 miod Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -477,7 +477,7 @@ creator_mmap(vsc, off, prot)
}
break;
case WSDISPLAYIO_MODE_DUMBFB:
- if (sc->sc_nreg < FFB_REG_DFB24)
+ if (sc->sc_nreg <= FFB_REG_DFB24)
break;
if (off >= 0 && off < sc->sc_sizes[FFB_REG_DFB24])
return (bus_space_mmap(sc->sc_bt,
diff --git a/sys/arch/sparc64/dev/creator_mainbus.c b/sys/arch/sparc64/dev/creator_mainbus.c
index 5457895b50a..8fba2f74a03 100644
--- a/sys/arch/sparc64/dev/creator_mainbus.c
+++ b/sys/arch/sparc64/dev/creator_mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: creator_mainbus.c,v 1.8 2003/06/17 17:35:40 miod Exp $ */
+/* $OpenBSD: creator_mainbus.c,v 1.9 2005/04/05 21:49:33 miod Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net),
@@ -83,7 +83,7 @@ creator_mainbus_attach(parent, self, aux)
nregs = min(ma->ma_nreg, FFB_NREGS);
- if (nregs < FFB_REG_DFB24) {
+ if (nregs <= FFB_REG_DFB24) {
printf(": no dfb24 regs found\n");
return;
}
diff --git a/sys/arch/sparc64/dev/creator_upa.c b/sys/arch/sparc64/dev/creator_upa.c
index aae2b90550f..fa259985b19 100644
--- a/sys/arch/sparc64/dev/creator_upa.c
+++ b/sys/arch/sparc64/dev/creator_upa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: creator_upa.c,v 1.7 2003/06/17 17:35:40 miod Exp $ */
+/* $OpenBSD: creator_upa.c,v 1.8 2005/04/05 21:49:33 miod Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -82,7 +82,7 @@ creator_upa_attach(parent, self, aux)
nregs = min(ma->ma_nreg, FFB_NREGS);
- if (nregs < FFB_REG_DFB24) {
+ if (nregs <= FFB_REG_DFB24) {
printf(": no dfb24 regs found\n");
return;
}