]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Fix couple of compiler warnings
authorJouni Malinen <j@w1.fi>
Wed, 22 Aug 2012 08:16:48 +0000 (11:16 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 22 Aug 2012 08:16:48 +0000 (11:16 +0300)
Signed-hostap: Jouni Malinen <j@w1.fi>

wlantest/bss.c
wlantest/rx_eapol.c

index 94f2580b6c3f0ebaca7644e278ce578ff1bc6c00..d554853a33fd8c5aaf122c3ffe3d5fad20b5dbb2 100644 (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;
index 7f2015d3021d3bc6f98cd33a51be71248a3623d1..a4e6e26e5d8b6ead9a87e6841b9a138cdbb902e7 100644 (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");