Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/vr make sure variables initialized



details:   https://anonhg.NetBSD.org/src/rev/50bc4c3f4b7c
branches:  trunk
changeset: 556878:50bc4c3f4b7c
user:      igy <igy%NetBSD.org@localhost>
date:      Mon Dec 29 12:31:48 2003 +0000

description:
make sure variables initialized

diffstat:

 sys/arch/hpcmips/vr/flash_vrip.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r e716c57c9024 -r 50bc4c3f4b7c sys/arch/hpcmips/vr/flash_vrip.c
--- a/sys/arch/hpcmips/vr/flash_vrip.c  Mon Dec 29 12:28:14 2003 +0000
+++ b/sys/arch/hpcmips/vr/flash_vrip.c  Mon Dec 29 12:31:48 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: flash_vrip.c,v 1.2 2003/07/15 02:29:34 lukem Exp $ */
+/* $NetBSD: flash_vrip.c,v 1.3 2003/12/29 12:31:48 igy Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: flash_vrip.c,v 1.2 2003/07/15 02:29:34 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash_vrip.c,v 1.3 2003/12/29 12:31:48 igy Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -517,6 +517,7 @@
        bus_space_write_2(iot, ioh, offset, I28F128_BLK_ERASE_1ST);
        bus_space_write_2(iot, ioh, offset, I28F128_BLK_ERASE_2ND);
 
+       status = 0;
        for (i = sc->sc_max_block_erase_timo; i > 0; i--) {
                tsleep(sc, PRIBIO, "blockerase",
                       1 + (sc->sc_typ_block_erase_timo * hz) / 1000);
@@ -552,6 +553,7 @@
        p = (u_int16_t *) sc->sc_buf;
        fence = offset + sc->sc_block_size;
        do {
+               status = 0;
                for (timo = sc->sc_max_buffer_write_timo; timo > 0; timo--) {
                        bus_space_write_2(iot, ioh, offset,
                                          I28F128_WRITE_BUFFER);



Home | Main Index | Thread Index | Old Index