Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/rockchip Loop variables work better when they a...



details:   https://anonhg.NetBSD.org/src/rev/bc93fd48eef8
branches:  trunk
changeset: 456941:bc93fd48eef8
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jun 01 19:32:19 2019 +0000

description:
Loop variables work better when they are initialized.

diffstat:

 sys/arch/arm/rockchip/rk_tsadc.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ced7719684c2 -r bc93fd48eef8 sys/arch/arm/rockchip/rk_tsadc.c
--- a/sys/arch/arm/rockchip/rk_tsadc.c  Sat Jun 01 19:13:41 2019 +0000
+++ b/sys/arch/arm/rockchip/rk_tsadc.c  Sat Jun 01 19:32:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rk_tsadc.c,v 1.5 2019/05/15 01:24:43 mrg Exp $ */
+/*     $NetBSD: rk_tsadc.c,v 1.6 2019/06/01 19:32:19 joerg Exp $       */
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -30,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: rk_tsadc.c,v 1.5 2019/05/15 01:24:43 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_tsadc.c,v 1.6 2019/06/01 19:32:19 joerg Exp $");
 
 /*
  * Driver for the TSADC temperature sensor monitor in RK3328 and RK3399.
@@ -804,7 +804,7 @@
 
        /* XXX */
        DPRINTF("(%s): interrupted", sc->sc_sme->sme_name);
-       for (unsigned n; n < __arraycount(rk_tsadc_sensors); n++) {
+       for (unsigned n = 0; n < __arraycount(rk_tsadc_sensors); n++) {
                struct rk_tsadc_sensor *rks = &sc->sc_sensors[n];
 
                rk_tsadc_refresh(sc->sc_sme, (envsys_data_t *)rks);



Home | Main Index | Thread Index | Old Index