Fix print format for size_t
Fix following compilation issues on 32 bit platform
hostapd/src/ap/ieee802_11_eht.c:959:6: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
common_info_len);
^~~~~~~~~~~~~~~
hostapd/src/ap/ieee802_11_eht.c:1130:7: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
link_info->nstr_bitmap_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~
Using %zu ensures consistent output across different platforms and
compilers, regardless of the underlying size of size_t.
Bug: 317188936
Test: m
Change-Id: Ibdd90dba18de0f3b1d14711afcdad523a85682e5
diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c
index 1d17518..c1ccda4 100644
--- a/src/ap/ieee802_11_eht.c
+++ b/src/ap/ieee802_11_eht.c
@@ -955,7 +955,7 @@
goto out;
}
- wpa_printf(MSG_DEBUG, "MLD: expected_common_info_len=%lu",
+ wpa_printf(MSG_DEBUG, "MLD: expected_common_info_len=%zu",
common_info_len);
if (sizeof(*ml) + common_info_len > ml_len) {
@@ -1125,7 +1125,7 @@
ml_len -= sub_elem_len;
wpa_printf(MSG_DEBUG, "MLD: link ctrl=0x%x, " MACSTR
- ", nstr bitmap len=%lu",
+ ", nstr bitmap len=%zu",
control, MAC2STR(link_info->peer_addr),
link_info->nstr_bitmap_len);