summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-03-03 02:14:03 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-03-03 02:14:03 +0000
commit4cc14d352e644d696645f03b9dcbbf778544d83d (patch)
tree2992aab9a5d3e7a82cd4e96573a6adac3c277a3c /sys/arch/sparc/dev
parentebf26765384bf85377083af5f4ad3cfcca892f7d (diff)
Do not attempt to read past firmware data in rfx_initialize().
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/rfx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/rfx.c b/sys/arch/sparc/dev/rfx.c
index 36cc92ea6e1..38393645ed6 100644
--- a/sys/arch/sparc/dev/rfx.c
+++ b/sys/arch/sparc/dev/rfx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfx.c,v 1.6 2004/11/29 22:07:37 miod Exp $ */
+/* $OpenBSD: rfx.c,v 1.7 2005/03/03 02:14:01 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
@@ -512,7 +512,7 @@ rfx_initialize(struct rfx_softc *sc, struct rfx_config *cf)
* Skip copyright notice
*/
data += RFX_INIT_OFFSET / sizeof(u_int32_t);
- cnt = RFX_INIT_SIZE - RFX_INIT_OFFSET / sizeof(u_int32_t);
+ cnt = (RFX_INIT_SIZE - RFX_INIT_OFFSET) / sizeof(u_int32_t);
cnt >>= 1;
/*
@@ -545,7 +545,7 @@ rfx_initialize(struct rfx_softc *sc, struct rfx_config *cf)
}
#ifdef DEBUG
- if (cnt == 0)
+ if (cnt != 0)
printf("%s: incoherent initialization data!\n");
#endif
}