Source-Changes-HG archive

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

[src/trunk]: src/libexec/getty Ensure rval is initialized before we try to ch...



details:   https://anonhg.NetBSD.org/src/rev/f190c31765a6
branches:  trunk
changeset: 581426:f190c31765a6
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Jun 01 15:50:00 2005 +0000

description:
Ensure rval is initialized before we try to check it; it won't be set
if AL or NN are in use.
Detected with gcc -Wuninitialized.

diffstat:

 libexec/getty/main.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r cae02b9919e2 -r f190c31765a6 libexec/getty/main.c
--- a/libexec/getty/main.c      Wed Jun 01 15:41:19 2005 +0000
+++ b/libexec/getty/main.c      Wed Jun 01 15:50:00 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.47 2005/03/17 01:25:40 christos Exp $       */
+/*     $NetBSD: main.c,v 1.48 2005/06/01 15:50:00 lukem Exp $  */
 
 /*-
  * Copyright (c) 1980, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "from: @(#)main.c       8.1 (Berkeley) 6/20/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.47 2005/03/17 01:25:40 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.48 2005/06/01 15:50:00 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -296,6 +296,7 @@
        for (;;) {
                int off;
 
+               rval = 0;
                gettable(tname, tabent);
                if (OPset || EPset || APset)
                        APset++, OPset++, EPset++;



Home | Main Index | Thread Index | Old Index