]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Use NULL instead of 0 as a pointer
authorJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 08:52:29 +0000 (10:52 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 22 Feb 2025 08:59:20 +0000 (10:59 +0200)
These function calls used 0 instead of the proper NULL as a pointer.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/pasn/pasn_initiator.c
src/pasn/pasn_responder.c

index 035ae81448b9a5de0fbba32cd8bc3ba9c63ec8a8..bee7e5805d9271635eca28edbc155e4ea6fb71bb 100644 (file)
@@ -44,7 +44,7 @@ int pasn_initiator_pmksa_cache_add(struct rsn_pmksa_cache *pmksa,
                                   size_t pmk_len, const u8 *pmkid)
 {
        if (pmksa_cache_add(pmksa, pmk, pmk_len, pmkid, NULL, 0, bssid,
-                           own_addr, NULL, WPA_KEY_MGMT_SAE, 0))
+                           own_addr, NULL, WPA_KEY_MGMT_SAE, NULL))
                return 0;
        return -1;
 }
@@ -126,7 +126,7 @@ static struct wpabuf * wpas_pasn_wd_sae_commit(struct pasn_data *pasn)
        wpabuf_put_le16(buf, 1);
        wpabuf_put_le16(buf, WLAN_STATUS_SAE_HASH_TO_ELEMENT);
 
-       sae_write_commit(&pasn->sae, buf, NULL, 0);
+       sae_write_commit(&pasn->sae, buf, NULL, NULL);
        pasn->sae.state = SAE_COMMITTED;
 
        return buf;
@@ -175,8 +175,8 @@ static int wpas_pasn_wd_sae_rx(struct pasn_data *pasn, struct wpabuf *wd)
                return -1;
        }
 
-       res = sae_parse_commit(&pasn->sae, data + 6, len - 6, NULL, 0, groups,
-                              1, NULL);
+       res = sae_parse_commit(&pasn->sae, data + 6, len - 6, NULL, NULL,
+                              groups, 1, NULL);
        if (res != WLAN_STATUS_SUCCESS) {
                wpa_printf(MSG_DEBUG, "PASN: SAE failed parsing commit");
                return -1;
@@ -499,7 +499,7 @@ static int wpas_pasn_wd_fils_rx(struct pasn_data *pasn, struct wpabuf *wd)
                                            pasn->pmk_len, pasn->fils.erp_pmkid,
                                            NULL, 0, pasn->peer_addr,
                                            pasn->own_addr, NULL,
-                                           pasn->akmp, 0);
+                                           pasn->akmp, NULL);
 
        pasn->fils.completed = true;
        return 0;
@@ -915,7 +915,7 @@ static int wpas_pasn_set_pmk(struct pasn_data *pasn,
                                                    pasn->sae.pmkid,
                                                    NULL, 0, pasn->peer_addr,
                                                    pasn->own_addr, NULL,
-                                                   pasn->akmp, 0);
+                                                   pasn->akmp, NULL);
                return 0;
        }
 #endif /* CONFIG_SAE */
index 11f27e16fcb4c951f30a8e7e98d260fc73131283..b4137b4702785b69e6fc4ffa16c407182e7dab54 100644 (file)
@@ -153,7 +153,7 @@ static int pasn_wd_handle_sae_commit(struct pasn_data *pasn,
                return -1;
        }
 
-       res = sae_parse_commit(&pasn->sae, data + 6, buf_len - 6, NULL, 0,
+       res = sae_parse_commit(&pasn->sae, data + 6, buf_len - 6, NULL, NULL,
                               groups, 0, NULL);
        if (res != WLAN_STATUS_SUCCESS) {
                wpa_printf(MSG_DEBUG, "PASN: Failed parsing SAE commit");
@@ -252,7 +252,7 @@ static struct wpabuf * pasn_get_sae_wd(struct pasn_data *pasn)
        wpabuf_put_le16(buf, WLAN_STATUS_SAE_HASH_TO_ELEMENT);
 
        /* Write the actual commit and update the length accordingly */
-       sae_write_commit(&pasn->sae, buf, NULL, 0);
+       sae_write_commit(&pasn->sae, buf, NULL, NULL);
        len = wpabuf_len(buf);
        WPA_PUT_LE16(len_ptr, len - 2);