Trivial style fixes

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-11-19 18:49:46 +01:00
parent 0ccc588c2f
commit ba9ddcb8d6
2 changed files with 3 additions and 5 deletions
+2 -3
View File
@@ -118,20 +118,19 @@ int uname_architecture(void) {
{ "arc", ARCHITECTURE_ARC },
{ "arceb", ARCHITECTURE_ARC_BE },
#else
#error "Please register your architecture here!"
# error "Please register your architecture here!"
#endif
};
static int cached = _ARCHITECTURE_INVALID;
struct utsname u;
unsigned i;
if (cached != _ARCHITECTURE_INVALID)
return cached;
assert_se(uname(&u) >= 0);
for (i = 0; i < ELEMENTSOF(arch_map); i++)
for (size_t i = 0; i < ELEMENTSOF(arch_map); i++)
if (streq(arch_map[i].machine, u.machine))
return cached = arch_map[i].arch;