tree-wide: replace for loop with FOREACH_ELEMENT or FOREACH_ARRAY macros (#34893)

This commit is contained in:
Integral
2024-10-26 07:10:22 +09:00
committed by GitHub
parent f7078de515
commit ddb8a639d5
46 changed files with 249 additions and 269 deletions
+3 -3
View File
@@ -130,9 +130,9 @@ Architecture uname_architecture(void) {
assert_se(uname(&u) >= 0);
for (size_t i = 0; i < ELEMENTSOF(arch_map); i++)
if (streq(arch_map[i].machine, u.machine))
return cached = arch_map[i].arch;
FOREACH_ELEMENT(entry, arch_map)
if (streq(entry->machine, u.machine))
return cached = entry->arch;
assert_not_reached();
return _ARCHITECTURE_INVALID;