Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/tx initialize variable 'err' properly.



details:   https://anonhg.NetBSD.org/src/rev/9583d4b5630e
branches:  trunk
changeset: 556736:9583d4b5630e
user:      shin <shin%NetBSD.org@localhost>
date:      Fri Dec 26 11:10:08 2003 +0000

description:
initialize variable 'err' properly.
found by gcc -Wuninitialized.

diffstat:

 sys/arch/hpcmips/tx/txcom.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 2687bc393193 -r 9583d4b5630e sys/arch/hpcmips/tx/txcom.c
--- a/sys/arch/hpcmips/tx/txcom.c       Fri Dec 26 10:51:25 2003 +0000
+++ b/sys/arch/hpcmips/tx/txcom.c       Fri Dec 26 11:10:08 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: txcom.c,v 1.22 2003/07/15 02:29:33 lukem Exp $ */
+/*     $NetBSD: txcom.c,v 1.23 2003/12/26 11:10:08 shin Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: txcom.c,v 1.22 2003/07/15 02:29:33 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: txcom.c,v 1.23 2003/12/26 11:10:08 shin Exp $");
 
 #include "opt_tx39uart_debug.h"
 
@@ -783,10 +783,11 @@
        struct txcom_softc *sc = txcom_cd.cd_devs[minor(dev)];
        struct txcom_chip *chip;
        struct tty *tp;
-       int s, err;
+       int s, err = ENXIO;
+;
 
        if (!sc)
-               return ENXIO;
+               return err;
 
        chip = sc->sc_chip;
        tp = sc->sc_tty;



Home | Main Index | Thread Index | Old Index