Invert conditional and use continue to reduce nesting.

This commit is contained in:
Matthew N. Dodd 2005-04-13 03:36:24 +00:00
parent 2ca94fca7e
commit 71ba49aa94

View File

@ -327,11 +327,11 @@ wi_attach(device_t dev)
val <<= 1; /* shift for base 1 indices */
for (i = 1; i < 16; i++) {
if (isset((u_int8_t*)&val, i)) {
ic->ic_channels[i].ic_freq =
ieee80211_ieee2mhz(i, IEEE80211_CHAN_B);
ic->ic_channels[i].ic_flags = IEEE80211_CHAN_B;
}
if (!isset((u_int8_t*)&val, i))
continue;
ic->ic_channels[i].ic_freq =
ieee80211_ieee2mhz(i, IEEE80211_CHAN_B);
ic->ic_channels[i].ic_flags = IEEE80211_CHAN_B;
}
/*