Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Avoid "declaration of 'delay' shadows a global de...



details:   https://anonhg.NetBSD.org/src/rev/446ba122ee8f
branches:  trunk
changeset: 790816:446ba122ee8f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Oct 22 13:04:25 2013 +0000

description:
Avoid "declaration of 'delay' shadows a global declaration" by renaming
the local variable.

diffstat:

 sys/dev/ic/arn5008.c |  16 ++++++++--------
 sys/dev/ic/arn9003.c |  16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)

diffs (78 lines):

diff -r 5d5a56e24ade -r 446ba122ee8f sys/dev/ic/arn5008.c
--- a/sys/dev/ic/arn5008.c      Tue Oct 22 12:57:40 2013 +0000
+++ b/sys/dev/ic/arn5008.c      Tue Oct 22 13:04:25 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arn5008.c,v 1.4 2013/10/17 21:24:24 christos Exp $     */
+/*     $NetBSD: arn5008.c,v 1.5 2013/10/22 13:04:25 skrll Exp $        */
 /*     $OpenBSD: ar5008.c,v 1.21 2012/08/25 12:14:31 kettenis Exp $    */
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.4 2013/10/17 21:24:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn5008.c,v 1.5 2013/10/22 13:04:25 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -1661,14 +1661,14 @@
 static __inline uint32_t
 ar5008_synth_delay(struct athn_softc *sc)
 {
-       uint32_t delay;
-
-       delay = MS(AR_READ(sc, AR_PHY_RX_DELAY), AR_PHY_RX_DELAY_DELAY);
+       uint32_t synth_delay;
+
+       synth_delay = MS(AR_READ(sc, AR_PHY_RX_DELAY), AR_PHY_RX_DELAY_DELAY);
        if (sc->sc_ic.ic_curmode == IEEE80211_MODE_11B)
-               delay = (delay * 4) / 22;
+               synth_delay = (synth_delay * 4) / 22;
        else
-               delay = delay / 10;     /* in 100ns steps */
-       return delay;
+               synth_delay = synth_delay / 10; /* in 100ns steps */
+       return synth_delay;
 }
 
 Static int
diff -r 5d5a56e24ade -r 446ba122ee8f sys/dev/ic/arn9003.c
--- a/sys/dev/ic/arn9003.c      Tue Oct 22 12:57:40 2013 +0000
+++ b/sys/dev/ic/arn9003.c      Tue Oct 22 13:04:25 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arn9003.c,v 1.4 2013/10/17 21:24:24 christos Exp $     */
+/*     $NetBSD: arn9003.c,v 1.5 2013/10/22 13:04:25 skrll Exp $        */
 /*     $OpenBSD: ar9003.c,v 1.25 2012/10/20 09:53:32 stsp Exp $        */
 
 /*-
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 1.4 2013/10/17 21:24:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arn9003.c,v 1.5 2013/10/22 13:04:25 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -1840,14 +1840,14 @@
 static __inline uint32_t
 ar9003_synth_delay(struct athn_softc *sc)
 {
-       uint32_t delay;
-
-       delay = MS(AR_READ(sc, AR_PHY_RX_DELAY), AR_PHY_RX_DELAY_DELAY);
+       uint32_t synth_delay;
+
+       synth_delay = MS(AR_READ(sc, AR_PHY_RX_DELAY), AR_PHY_RX_DELAY_DELAY);
        if (sc->sc_ic.ic_curmode == IEEE80211_MODE_11B)
-               delay = (delay * 4) / 22;
+               synth_delay = (synth_delay * 4) / 22;
        else
-               delay = delay / 10;     /* in 100ns steps */
-       return delay;
+               synth_delay = synth_delay / 10; /* in 100ns steps */
+       return synth_delay;
 }
 
 Static int



Home | Main Index | Thread Index | Old Index