summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/tcpip.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-01-15 03:24:44 +0000
committerjkh <jkh@FreeBSD.org>1997-01-15 03:24:44 +0000
commitabdf7664f7d02d06337aca4f1f183d3105936520 (patch)
treea5e5a2bba9aaf35574908d1b6de65621fc17d1c0 /release/sysinstall/tcpip.c
parentb80b05437847835ec499856bedb2917a600da12d (diff)
downloadFreeBSD-src-abdf7664f7d02d06337aca4f1f183d3105936520.zip
FreeBSD-src-abdf7664f7d02d06337aca4f1f183d3105936520.tar.gz
Set defaults more rationally through the item selection loop.
Diffstat (limited to 'release/sysinstall/tcpip.c')
-rw-r--r--release/sysinstall/tcpip.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c
index d9159b6..e807002 100644
--- a/release/sysinstall/tcpip.c
+++ b/release/sysinstall/tcpip.c
@@ -238,27 +238,21 @@ tcpOpenDialog(Device *devp)
reenter:
cancelbutton = okbutton = 0;
while (layoutDialogLoop(ds_win, layout, &obj, &n, max, &cancelbutton, &cancel)) {
- if (n == LAYOUT_IPADDR) {
- /* Insert a default value for the netmask, 0xffffff00 is
- the most appropriate one (entire class C, or subnetted
- class A/B network). */
- if (netmask[0] == '\0') {
- strcpy(netmask, "255.255.255.0");
- RefreshStringObj(layout[LAYOUT_NETMASK].obj);
- }
+ /* Insert a default value for the netmask, 0xffffff00 is
+ the most appropriate one (entire class C, or subnetted
+ class A/B network). */
+ if (netmask[0] == '\0') {
+ strcpy(netmask, "255.255.255.0");
+ RefreshStringObj(layout[LAYOUT_NETMASK].obj);
}
- else if (n == LAYOUT_DOMAINNAME) {
- if (!index(hostname, '.') && domainname[0]) {
- strcat(hostname, ".");
- strcat(hostname, domainname);
- RefreshStringObj(layout[LAYOUT_HOSTNAME].obj);
- }
+ if (!index(hostname, '.') && domainname[0]) {
+ strcat(hostname, ".");
+ strcat(hostname, domainname);
+ RefreshStringObj(layout[LAYOUT_HOSTNAME].obj);
}
- else if (n == LAYOUT_HOSTNAME) {
- if (((tmp = index(hostname, '.')) != NULL) && !domainname[0]) {
- SAFE_STRCPY(domainname, tmp + 1);
- RefreshStringObj(layout[LAYOUT_DOMAINNAME].obj);
- }
+ else if (((tmp = index(hostname, '.')) != NULL) && !domainname[0]) {
+ SAFE_STRCPY(domainname, tmp + 1);
+ RefreshStringObj(layout[LAYOUT_DOMAINNAME].obj);
}
}
OpenPOWER on IntegriCloud