Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/config Don't try to use an uninitialized variable.



details:   https://anonhg.NetBSD.org/src/rev/86c92f3d671a
branches:  trunk
changeset: 581498:86c92f3d671a
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 05:12:41 2005 +0000

description:
Don't try to use an uninitialized variable.
Detected with gcc -Wuninitialized.

diffstat:

 usr.sbin/config/main.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 24adb4cefe0b -r 86c92f3d671a usr.sbin/config/main.c
--- a/usr.sbin/config/main.c    Thu Jun 02 05:11:55 2005 +0000
+++ b/usr.sbin/config/main.c    Thu Jun 02 05:12:41 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.97 2004/11/05 18:07:27 mason Exp $  */
+/*     $NetBSD: main.c,v 1.98 2005/06/02 05:12:41 lukem Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -1336,6 +1336,7 @@
        if (!cfg)
                return;
 
+       missingeol = 0;
        if (fstat(fileno(cf), &st) == -1)
                return;
        if (cfgtime < st.st_mtime)



Home | Main Index | Thread Index | Old Index