summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2001-07-25 05:52:19 +0000
committerbrooks <brooks@FreeBSD.org>2001-07-25 05:52:19 +0000
commitc5d3adcccc5ed1221f7e0b011f8a823b6b22629b (patch)
tree42930aab79751abeea4779f5de7c1470f77d761a /sbin/ifconfig
parent34224133fcee1b7969727caee02fd7039b2f64fd (diff)
downloadFreeBSD-src-c5d3adcccc5ed1221f7e0b011f8a823b6b22629b.zip
FreeBSD-src-c5d3adcccc5ed1221f7e0b011f8a823b6b22629b.tar.gz
Fix a stupid bug which resulted in a blank line in the status output if
WEP is supported, but not keys are set. MFC after: 3 days
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifieee80211.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index 0566dcd..ac8c871 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -359,10 +359,8 @@ ieee80211_status (s, info)
printf("\n");
ireq.i_type = IEEE80211_IOC_WEP;
- if (ioctl(s, SIOCG80211, &ireq) < 0 ||
- ireq.i_val == IEEE80211_WEP_NOSUP)
- goto nowep;
- else {
+ if (ioctl(s, SIOCG80211, &ireq) != -1 &&
+ ireq.i_val != IEEE80211_WEP_NOSUP) {
printf("\twepmode");
switch (ireq.i_val) {
case IEEE80211_WEP_OFF:
@@ -415,11 +413,9 @@ ieee80211_status (s, info)
if(spacer == '\t')
spacer = ' ';
}
-
- printf("\n");
+ if (spacer == ' ')
+ printf("\n");
}
-nowep:
-
end:
return;
OpenPOWER on IntegriCloud