Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst Fix a bogus gcc warning: dhcp_config may be...



details:   https://anonhg.NetBSD.org/src/rev/d8baa673d92c
branches:  trunk
changeset: 802402:d8baa673d92c
user:      roy <roy%NetBSD.org@localhost>
date:      Sat Sep 13 09:46:12 2014 +0000

description:
Fix a bogus gcc warning: dhcp_config may be used uninitialized

diffstat:

 usr.sbin/sysinst/net.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r eefd7ec083c2 -r d8baa673d92c usr.sbin/sysinst/net.c
--- a/usr.sbin/sysinst/net.c    Sat Sep 13 09:38:43 2014 +0000
+++ b/usr.sbin/sysinst/net.c    Sat Sep 13 09:46:12 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net.c,v 1.13 2014/09/13 09:38:43 roy Exp $     */
+/*     $NetBSD: net.c,v 1.14 2014/09/13 09:46:12 roy Exp $     */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -532,6 +532,7 @@
            return 0;
 
        network_up = 1;
+       dhcp_config = 0;
 
        strncpy(net_dev, net_devs[selected_net].if_dev, STRSIZE);
 
@@ -544,13 +545,10 @@
        /* If root is on NFS do not reconfigure the interface. */
        if (statvfs("/", &sb) == 0 && strcmp(sb.f_fstypename, "nfs") == 0) {
                nfs_root = 1;
-               dhcp_config = 0;
                get_ifinterface_info();
                get_if6interface_info();
                get_host_info();
-       } else if (slip) {
-               dhcp_config = 0;
-       } else {
+       } else if (!slip) {
                /* Preload any defaults we can find */
                get_ifinterface_info();
                get_if6interface_info();



Home | Main Index | Thread Index | Old Index