Remove unnecessary NULL check from hostapd_config_read_wpa_psk() call

This function is already checking the fname argument against NULL, so
use that check on its own instead of duplicating the check in the only
caller.

Signed-off-by: Jouni Malinen <j@w1.fi>
master
Jouni Malinen 8 years ago
parent 9ec3debf24
commit 34e29dfd4b

@ -333,13 +333,7 @@ int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf)
ssid->wpa_psk->group = 1;
}
if (ssid->wpa_psk_file) {
if (hostapd_config_read_wpa_psk(ssid->wpa_psk_file,
&conf->ssid))
return -1;
}
return 0;
return hostapd_config_read_wpa_psk(ssid->wpa_psk_file, &conf->ssid);
}

Loading…
Cancel
Save