Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm Fix off-by-one error in delay().



details:   https://anonhg.NetBSD.org/src/rev/1f6d6c8db719
branches:  trunk
changeset: 526371:1f6d6c8db719
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Thu May 02 22:01:46 2002 +0000

description:
Fix off-by-one error in delay().

diffstat:

 sys/arch/arm/footbridge/footbridge_clock.c |  4 ++--
 sys/arch/arm/iomd/iomd_clock.c             |  4 ++--
 sys/arch/arm/ofw/ofwgencfg_clock.c         |  4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 272151f611b5 -r 1f6d6c8db719 sys/arch/arm/footbridge/footbridge_clock.c
--- a/sys/arch/arm/footbridge/footbridge_clock.c        Thu May 02 21:45:06 2002 +0000
+++ b/sys/arch/arm/footbridge/footbridge_clock.c        Thu May 02 22:01:46 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: footbridge_clock.c,v 1.4 2002/01/05 22:41:47 chris Exp $       */
+/*     $NetBSD: footbridge_clock.c,v 1.5 2002/05/02 22:01:46 mycroft Exp $     */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -307,7 +307,7 @@
        u_int i;
 
        if (n == 0) return;
-       while (--n > 0) {
+       while (n-- > 0) {
                if (cputype == CPU_ID_SA110)    /* XXX - Seriously gross hack */
                        for (i = delaycount; --i;);
                else
diff -r 272151f611b5 -r 1f6d6c8db719 sys/arch/arm/iomd/iomd_clock.c
--- a/sys/arch/arm/iomd/iomd_clock.c    Thu May 02 21:45:06 2002 +0000
+++ b/sys/arch/arm/iomd/iomd_clock.c    Thu May 02 22:01:46 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iomd_clock.c,v 1.5 2002/02/18 12:18:26 bjh21 Exp $     */
+/*     $NetBSD: iomd_clock.c,v 1.6 2002/05/02 22:01:47 mycroft Exp $   */
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -352,7 +352,7 @@
        u_int i;
 
        if (n == 0) return;
-       while (--n > 0) {
+       while (n-- > 0) {
                if (cputype == CPU_ID_SA110)    /* XXX - Seriously gross hack */
                        for (i = delaycount; --i;);
                else
diff -r 272151f611b5 -r 1f6d6c8db719 sys/arch/arm/ofw/ofwgencfg_clock.c
--- a/sys/arch/arm/ofw/ofwgencfg_clock.c        Thu May 02 21:45:06 2002 +0000
+++ b/sys/arch/arm/ofw/ofwgencfg_clock.c        Thu May 02 22:01:46 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofwgencfg_clock.c,v 1.1 2002/02/06 21:30:26 thorpej Exp $      */
+/*     $NetBSD: ofwgencfg_clock.c,v 1.2 2002/05/02 22:01:47 mycroft Exp $      */
 
 /*
  * Copyright 1997
@@ -195,7 +195,7 @@
        u_int i;
 
        if (n == 0) return;
-       while (--n > 0) {
+       while (n-- > 0) {
                if (cputype == CPU_ID_SA110)    /* XXX - Seriously gross hack */
                        for (i = delaycount; --i;);
                else



Home | Main Index | Thread Index | Old Index