summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-11-29 05:42:18 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-11-29 05:42:18 +0000
commitd03e0462226c74b4b3262034f0154ffaa6de8a66 (patch)
tree1f0c3b42d43c0d2cf11134e30f7043c0d9f3474e
parentb2b49fdc27fd2a4c2ef54b3853ea3a97b5001e1d (diff)
from the diffs so old they're growing mold dept:
while () return; is pretty dumb, change to ifs as intended
-rw-r--r--sys/dev/pci/cs4280.c5
-rw-r--r--sys/dev/pci/cs4281.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 1215b503f24..274116cefe5 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4280.c,v 1.23 2005/08/09 04:10:10 mickey Exp $ */
+/* $OpenBSD: cs4280.c,v 1.24 2005/11/29 05:42:17 tedu Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
@@ -376,10 +376,11 @@ cs4280_src_wait(sc)
struct cs4280_softc *sc;
{
int n;
+
n = 0;
while ((BA0READ4(sc, CS4280_ACCTL) & ACCTL_DCV)) {
delay(1000);
- while (++n > 1000)
+ if (++n > 1000)
return (-1);
}
return (0);
diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c
index c6f22b1255e..84b236ddd95 100644
--- a/sys/dev/pci/cs4281.c
+++ b/sys/dev/pci/cs4281.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4281.c,v 1.18 2005/11/21 21:52:47 miod Exp $ */
+/* $OpenBSD: cs4281.c,v 1.19 2005/11/29 05:42:17 tedu Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
@@ -1588,7 +1588,7 @@ cs4281_src_wait(sc)
n = 0;
while ((BA0READ4(sc, CS4281_ACCTL) & ACCTL_DCV)) {
delay(1000);
- while (++n > 1000)
+ if (++n > 1000)
return (-1);
}
return (0);