hostapd/src
Benjamin Berg dbdf7ef679 Use for_each_link() in most cases
This was done using the below semantic patch. There are a few more
places that were missed due to variable declarations or additional
checks in the for loop.

@@
iterator name for_each_link;
identifier max_links =~ "MAX_NUM_MLD_LINKS|MAX_NUM_MLO_LINKS";
expression links;
expression further_tests;
identifier i;
statement stmt;
@@
-for (i = 0; i < max_links; i++)
+for_each_link(links, i)
 {
(
-  if (!(links & BIT(i)))
-    continue;
   ...
|
-  if (!(links & BIT(i)) || further_tests)
+  if (further_tests)
     continue;
   ...
|
-  if (further_tests || !(links & BIT(i)))
+  if (further_tests)
     continue;
   ...
|
-  if (links & BIT(i))
     stmt
|
-  if (further_tests && (links & BIT(i)))
+  if (further_tests)
     stmt
|
-  if ((links & BIT(i)) && further_tests)
+  if (further_tests)
     stmt
)
 }

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
2024-03-02 11:11:12 +02:00
..
ap Use for_each_link() in most cases 2024-03-02 11:11:12 +02:00
common Add QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER command 2024-02-16 19:37:47 +02:00
crypto OpenSSL: Use library functions for HPKE when possible 2024-01-28 20:18:07 +02:00
drivers Use for_each_link() in most cases 2024-03-02 11:11:12 +02:00
eap_common crypto: Check if crypto_bignum_to_bin() is successful 2022-12-17 12:11:13 +02:00
eap_peer EAP-SIM/AKA peer: Fix use-after-free for privacy identity 2024-01-22 11:47:00 +02:00
eap_server EAP-SIM/AKA server: Configurable limit to fast re-authentication 2023-09-21 11:55:49 +03:00
eapol_auth Do not disconnect EAPOL-Logoff before authentication 2023-05-04 11:10:16 +03:00
eapol_supp Compile-time config for dynamically loading libraries in wpa_supplicant 2023-11-05 10:23:29 +02:00
fst Use ether_addr_equal() to compare whether two MAC addresses are equal 2024-01-13 23:47:21 +02:00
l2_packet l2_packet_freebsd: Fix macOS build 2024-02-24 18:29:57 +02:00
p2p P2P: Accept P2P SD response without TX status 2024-01-26 17:12:16 +02:00
pae Use ether_addr_equal() to compare whether two MAC addresses are equal 2024-01-13 23:47:21 +02:00
pasn Use ether_addr_equal() to compare whether two MAC addresses are equal 2024-01-13 23:47:21 +02:00
radius RADIUS: Preliminary support RADIUS/TLS as an alternative to RADIUS/UDP 2024-02-25 20:54:14 +02:00
rsn_supp Use for_each_link() in most cases 2024-03-02 11:11:12 +02:00
tls Get rid of multiple MIN macros 2024-01-14 20:13:20 +02:00
utils common: Introduce for_each_link() macro 2024-03-02 11:02:54 +02:00
wps Use ether_addr_equal() to compare whether two MAC addresses are equal 2024-01-13 23:47:21 +02:00
build.rules build: Rebuild libs all the time 2020-10-12 20:18:02 +03:00
lib.rules build: lib.rules: Add common-clean 2020-10-16 12:51:12 +03:00
Makefile PASN: Move initiator changes into a separate file 2022-11-04 00:52:17 +02:00
objs.mk build: Fix dependency file inclusion 2020-10-12 11:05:16 +03:00