summaryrefslogtreecommitdiffstats
path: root/src/basic/architecture.c
diff options
context:
space:
mode:
authorIntegral <integral@member.fsf.org>2024-10-26 00:10:22 +0200
committerGitHub <noreply@github.com>2024-10-26 00:10:22 +0200
commitddb8a639d5d1f9a0ebfa790805703cf381a42459 (patch)
treeee6fcdfcecd1ab5c5e4840d41e901d73f1ec38a2 /src/basic/architecture.c
parentMerge pull request #34884 from poettering/run0-disconnect-fix (diff)
downloadsystemd-ddb8a639d5d1f9a0ebfa790805703cf381a42459.tar.xz
systemd-ddb8a639d5d1f9a0ebfa790805703cf381a42459.zip
tree-wide: replace for loop with FOREACH_ELEMENT or FOREACH_ARRAY macros (#34893)
Diffstat (limited to 'src/basic/architecture.c')
-rw-r--r--src/basic/architecture.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/architecture.c b/src/basic/architecture.c
index 488367c188..c7d5b0d8bd 100644
--- a/src/basic/architecture.c
+++ b/src/basic/architecture.c
@@ -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;