mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +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,7 +1707,8 @@ static struct l_dbus_message *dpp_dbus_start_enrollee(struct l_dbus *dbus,
|
|||||||
if (station && station_get_connected_network(station)) {
|
if (station && station_get_connected_network(station)) {
|
||||||
l_warn("cannot be enrollee while connected, please disconnect");
|
l_warn("cannot be enrollee while connected, please disconnect");
|
||||||
return dbus_error_busy(message);
|
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,
|
dpp->uri = dpp_generate_uri(dpp->pub_asn1, dpp->pub_asn1_len, 2,
|
||||||
|
@ -2389,11 +2389,11 @@ static void eapol_eap_complete_cb(enum eap_result result, void *user_data)
|
|||||||
sm->eap = NULL;
|
sm->eap = NULL;
|
||||||
handshake_failed(sm, MMPDU_REASON_CODE_IEEE8021X_FAILED);
|
handshake_failed(sm, MMPDU_REASON_CODE_IEEE8021X_FAILED);
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
if (install_pmk)
|
if (install_pmk)
|
||||||
install_pmk(sm->handshake, sm->handshake->pmk,
|
install_pmk(sm->handshake, sm->handshake->pmk,
|
||||||
sm->handshake->pmk_len);
|
sm->handshake->pmk_len);
|
||||||
}
|
|
||||||
|
|
||||||
eap_reset(sm->eap);
|
eap_reset(sm->eap);
|
||||||
|
|
||||||
|
@ -996,7 +996,7 @@ bool network_bss_add(struct network *network, struct scan_bss *bss)
|
|||||||
/* Done if BSS is not HS20 or we already have network_info set */
|
/* Done if BSS is not HS20 or we already have network_info set */
|
||||||
if (!bss->hs20_capable)
|
if (!bss->hs20_capable)
|
||||||
return true;
|
return true;
|
||||||
else
|
|
||||||
network->is_hs20 = true;
|
network->is_hs20 = true;
|
||||||
|
|
||||||
if (network->info)
|
if (network->info)
|
||||||
|
@ -1597,7 +1597,8 @@ static void p2p_peer_provision_done(int err, struct wsc_credentials_info *creds,
|
|||||||
|
|
||||||
p2p_connection_reset(dev);
|
p2p_connection_reset(dev);
|
||||||
return;
|
return;
|
||||||
} else
|
}
|
||||||
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,8 @@ static int station_autoconnect_next(struct station *station)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else
|
}
|
||||||
|
|
||||||
l_debug("autoconnect: network_autoconnect: %s (%d)",
|
l_debug("autoconnect: network_autoconnect: %s (%d)",
|
||||||
strerror(-r), r);
|
strerror(-r), r);
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,8 @@ static bool wiphy_can_connect_sae(struct wiphy *wiphy)
|
|||||||
* TODO: No support for CMD_EXTERNAL_AUTH yet.
|
* TODO: No support for CMD_EXTERNAL_AUTH yet.
|
||||||
*/
|
*/
|
||||||
return false;
|
return false;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
/* Case (2) */
|
/* Case (2) */
|
||||||
if (wiphy_has_ext_feature(wiphy,
|
if (wiphy_has_ext_feature(wiphy,
|
||||||
NL80211_EXT_FEATURE_SAE_OFFLOAD))
|
NL80211_EXT_FEATURE_SAE_OFFLOAD))
|
||||||
@ -217,7 +218,6 @@ static bool wiphy_can_connect_sae(struct wiphy *wiphy)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
enum ie_rsn_akm_suite wiphy_select_akm(struct wiphy *wiphy,
|
enum ie_rsn_akm_suite wiphy_select_akm(struct wiphy *wiphy,
|
||||||
const struct scan_bss *bss,
|
const struct scan_bss *bss,
|
||||||
|
Loading…
Reference in New Issue
Block a user