tree-wide: replace for loop with FOREACH_ELEMENT or FOREACH_ARRAY macros (#34893)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user