Source-Changes-HG archive

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

[src/trunk]: src/libexec/telnetd Ensure IF is initialized before trying to us...



details:   https://anonhg.NetBSD.org/src/rev/b8c53961a72e
branches:  trunk
changeset: 581430:b8c53961a72e
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Jun 01 15:57:40 2005 +0000

description:
Ensure IF is initialized before trying to use it.
Found with -Wuninitialized.

diffstat:

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

diffs (26 lines):

diff -r 399cc09fa3cb -r b8c53961a72e libexec/telnetd/telnetd.c
--- a/libexec/telnetd/telnetd.c Wed Jun 01 15:57:23 2005 +0000
+++ b/libexec/telnetd/telnetd.c Wed Jun 01 15:57:40 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: telnetd.c,v 1.46 2005/02/06 05:58:21 perry Exp $       */
+/*     $NetBSD: telnetd.c,v 1.47 2005/06/01 15:57:40 lukem Exp $       */
 
 /*
  * Copyright (C) 1997 and 1998 WIDE Project.
@@ -65,7 +65,7 @@
 #if 0
 static char sccsid[] = "@(#)telnetd.c  8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: telnetd.c,v 1.46 2005/02/06 05:58:21 perry Exp $");
+__RCSID("$NetBSD: telnetd.c,v 1.47 2005/06/01 15:57:40 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -913,6 +913,7 @@
        } else {
                IM = DEFAULT_IM;
                HE = 0;
+               IF = NULL;
        }
        edithost(HE, host_name);
        ptyibuf2ptr = ptyibuf2;



Home | Main Index | Thread Index | Old Index