wlantest: Fix couple of compiler warnings

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-08-22 11:16:48 +03:00
parent 0121126211
commit add11058e2
2 changed files with 1 additions and 3 deletions

View file

@ -92,7 +92,7 @@ int bss_add_pmk_from_passphrase(struct wlantest_bss *bss,
pmk = os_zalloc(sizeof(*pmk));
if (pmk == NULL)
return -1;
if (pbkdf2_sha1(passphrase, (char *) bss->ssid, bss->ssid_len, 4096,
if (pbkdf2_sha1(passphrase, bss->ssid, bss->ssid_len, 4096,
pmk->pmk, sizeof(pmk->pmk)) < 0) {
os_free(pmk);
return -1;

View file

@ -648,7 +648,6 @@ static void rx_data_eapol_key_1_of_2(struct wlantest *wt, const u8 *dst,
struct wlantest_sta *sta;
const struct ieee802_1x_hdr *eapol;
const struct wpa_eapol_key *hdr;
const u8 *key_data;
u16 key_info, ver;
u8 *decrypted;
size_t decrypted_len = 0;
@ -679,7 +678,6 @@ static void rx_data_eapol_key_1_of_2(struct wlantest *wt, const u8 *dst,
}
wpa_printf(MSG_DEBUG, "Valid MIC found in EAPOL-Key 1/2");
key_data = (const u8 *) (hdr + 1);
if (sta->proto & WPA_PROTO_RSN &&
!(key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) {
wpa_printf(MSG_INFO, "EAPOL-Key 1/2 without EncrKeyData bit");