mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
treewide: Remove unneeded else statements
The code is more readable without the unnecessary nesting
This commit is contained in:
parent
b44460464e
commit
073346ee37
@ -1707,8 +1707,9 @@ static struct l_dbus_message *dpp_dbus_start_enrollee(struct l_dbus *dbus,
|
||||
if (station && station_get_connected_network(station)) {
|
||||
l_warn("cannot be enrollee while connected, please disconnect");
|
||||
return dbus_error_busy(message);
|
||||
} else
|
||||
l_debug("No station device, continuing anyways...");
|
||||
}
|
||||
|
||||
l_debug("No station device, continuing anyways...");
|
||||
|
||||
dpp->uri = dpp_generate_uri(dpp->pub_asn1, dpp->pub_asn1_len, 2,
|
||||
netdev_get_address(dpp->netdev), &freq,
|
||||
|
@ -2389,12 +2389,12 @@ static void eapol_eap_complete_cb(enum eap_result result, void *user_data)
|
||||
sm->eap = NULL;
|
||||
handshake_failed(sm, MMPDU_REASON_CODE_IEEE8021X_FAILED);
|
||||
return;
|
||||
} else {
|
||||
if (install_pmk)
|
||||
install_pmk(sm->handshake, sm->handshake->pmk,
|
||||
sm->handshake->pmk_len);
|
||||
}
|
||||
|
||||
if (install_pmk)
|
||||
install_pmk(sm->handshake, sm->handshake->pmk,
|
||||
sm->handshake->pmk_len);
|
||||
|
||||
eap_reset(sm->eap);
|
||||
|
||||
if (sm->handshake->authenticator) {
|
||||
|
@ -996,8 +996,8 @@ bool network_bss_add(struct network *network, struct scan_bss *bss)
|
||||
/* Done if BSS is not HS20 or we already have network_info set */
|
||||
if (!bss->hs20_capable)
|
||||
return true;
|
||||
else
|
||||
network->is_hs20 = true;
|
||||
|
||||
network->is_hs20 = true;
|
||||
|
||||
if (network->info)
|
||||
return true;
|
||||
|
@ -1597,8 +1597,9 @@ static void p2p_peer_provision_done(int err, struct wsc_credentials_info *creds,
|
||||
|
||||
p2p_connection_reset(dev);
|
||||
return;
|
||||
} else
|
||||
goto error;
|
||||
}
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (strlen(creds[0].ssid) != bss->ssid_len ||
|
||||
|
@ -237,9 +237,10 @@ static int station_autoconnect_next(struct station *station)
|
||||
}
|
||||
|
||||
return 0;
|
||||
} else
|
||||
l_debug("autoconnect: network_autoconnect: %s (%d)",
|
||||
strerror(-r), r);
|
||||
}
|
||||
|
||||
l_debug("autoconnect: network_autoconnect: %s (%d)",
|
||||
strerror(-r), r);
|
||||
}
|
||||
|
||||
return -ENOENT;
|
||||
|
14
src/wiphy.c
14
src/wiphy.c
@ -209,14 +209,14 @@ static bool wiphy_can_connect_sae(struct wiphy *wiphy)
|
||||
* TODO: No support for CMD_EXTERNAL_AUTH yet.
|
||||
*/
|
||||
return false;
|
||||
} else {
|
||||
/* Case (2) */
|
||||
if (wiphy_has_ext_feature(wiphy,
|
||||
NL80211_EXT_FEATURE_SAE_OFFLOAD))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Case (2) */
|
||||
if (wiphy_has_ext_feature(wiphy,
|
||||
NL80211_EXT_FEATURE_SAE_OFFLOAD))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
enum ie_rsn_akm_suite wiphy_select_akm(struct wiphy *wiphy,
|
||||
|
Loading…
Reference in New Issue
Block a user