aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-07-03 16:57:31 (GMT)
committerJouni Malinen <j@w1.fi>2016-07-03 19:37:01 (GMT)
commitf7c04e50bdadcfb15327ba3dbad199f54889f579 (patch)
treefe97fd9124153c1d9135fff360a1a97b3ed92bf2 /wpa_supplicant
parentc8ae9daf2bd0a95fad3c4dc8088f9d0b2fc37fbd (diff)
downloadhostap-f7c04e50bdadcfb15327ba3dbad199f54889f579.zip
hostap-f7c04e50bdadcfb15327ba3dbad199f54889f579.tar.gz
hostap-f7c04e50bdadcfb15327ba3dbad199f54889f579.tar.bz2
Interworking: Combine identical error returns into a single one
There is no need to maintain separate "return -1;" for each of the wpa_config_set() calls that cannot really fail in practice. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/interworking.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 589ee57..1e42f43 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -950,11 +950,9 @@ static int interworking_set_hs20_params(struct wpa_supplicant *wpa_s,
if (!key_mgmt)
key_mgmt = wpa_s->conf->pmf != NO_MGMT_FRAME_PROTECTION ?
"WPA-EAP WPA-EAP-SHA256" : "WPA-EAP";
- if (wpa_config_set(ssid, "key_mgmt", key_mgmt, 0) < 0)
- return -1;
- if (wpa_config_set(ssid, "proto", "RSN", 0) < 0)
- return -1;
- if (wpa_config_set(ssid, "pairwise", "CCMP", 0) < 0)
+ if (wpa_config_set(ssid, "key_mgmt", key_mgmt, 0) < 0 ||
+ wpa_config_set(ssid, "proto", "RSN", 0) < 0 ||
+ wpa_config_set(ssid, "pairwise", "CCMP", 0) < 0)
return -1;
return 0;
}