Module Name: src Committed By: roy Date: Sat Sep 13 09:46:12 UTC 2014
Modified Files: src/usr.sbin/sysinst: net.c Log Message: Fix a bogus gcc warning: dhcp_config may be used uninitialized To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/sysinst/net.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/sysinst/net.c diff -u src/usr.sbin/sysinst/net.c:1.13 src/usr.sbin/sysinst/net.c:1.14 --- src/usr.sbin/sysinst/net.c:1.13 Sat Sep 13 09:38:43 2014 +++ src/usr.sbin/sysinst/net.c Sat Sep 13 09:46:12 2014 @@ -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 @@ again: return 0; network_up = 1; + dhcp_config = 0; strncpy(net_dev, net_devs[selected_net].if_dev, STRSIZE); @@ -544,13 +545,10 @@ again: /* 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();