summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-11-19 16:34:17 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-11-19 18:49:46 +0100
commitba9ddcb8d6eb8a6cd4c258621a5701851ad92e6e (patch)
treebd68ab2deb6942a8903924cf2b54944f1b9d32f9
parent0ccc588c2f2db432e90eacfd8ec30cd6244cfeb2 (diff)
downloadsystemd-ba9ddcb8d6eb8a6cd4c258621a5701851ad92e6e.tar.gz
Trivial style fixes
-rw-r--r--src/basic/architecture.c5
-rw-r--r--src/test/test-gpt.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/src/basic/architecture.c b/src/basic/architecture.c
index 4f5c5b86a6..6bf0042552 100644
--- a/src/basic/architecture.c
+++ b/src/basic/architecture.c
@@ -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;
diff --git a/src/test/test-gpt.c b/src/test/test-gpt.c
index bcab6bdf6f..9b0eb57373 100644
--- a/src/test/test-gpt.c
+++ b/src/test/test-gpt.c
@@ -18,7 +18,7 @@ static void test_gpt_types_against_architectures(void) {
/* Dumps a table indicating for which architectures we know we have matching GPT partition
* types. Also validates whether we can properly categorize the entries. */
- FOREACH_STRING(prefix, "root-", "usr-") {
+ FOREACH_STRING(prefix, "root-", "usr-")
for (int a = 0; a < _ARCHITECTURE_MAX; a++) {
const char *suffix;
@@ -48,7 +48,6 @@ static void test_gpt_types_against_architectures(void) {
assert_se(gpt_partition_type_is_usr_verity(id));
}
}
- }
}
int main(int argc, char *argv[]) {