]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove a static analyzer warning about unused variable write
authorJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 14:16:48 +0000 (16:16 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 2 Mar 2014 15:15:12 +0000 (17:15 +0200)
The pos variable was not used between its first and second assignment.
Clean this up by using the pos variables instead of the buf (start of
the buffer).

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/peerkey_auth.c

index ba5c606442f4356a5e261fd3fc5eac0dc12644ce..612babc67e8504236be99f77832c02eb05027e15 100644 (file)
@@ -221,8 +221,8 @@ static void wpa_send_smk_m5(struct wpa_authenticator *wpa_auth,
                return;
 
        /* Peer RSN IE */
-       os_memcpy(buf, kde->rsn_ie, kde->rsn_ie_len);
-       pos = buf + kde->rsn_ie_len;
+       os_memcpy(pos, kde->rsn_ie, kde->rsn_ie_len);
+       pos += kde->rsn_ie_len;
 
        /* Peer MAC Address */
        pos = wpa_add_kde(pos, RSN_KEY_DATA_MAC_ADDR, peer, ETH_ALEN, NULL, 0);