diff --git a/man/systemd-sysext.xml b/man/systemd-sysext.xml
index 258c7142c9..96e40ddf95 100644
--- a/man/systemd-sysext.xml
+++ b/man/systemd-sysext.xml
@@ -83,12 +83,12 @@
service manager supports via /. Similar to
them they may optionally carry Verity authentication information.
- System extensions are automatically looked for in the directories
+ System extensions are searched for in the directories
/etc/extensions/, /run/extensions/ and
/var/lib/extensions/. The first two listed directories are not suitable for
carrying large binary images, however are still useful for carrying symlinks to them. The primary place
for installing system extensions is /var/lib/extensions/. Any directories found in
- these search directories are considered directory based extension images, any files with the
+ these search directories are considered directory based extension images; any files with the
.raw suffix are considered disk image based extension images.During boot OS extension images are activated automatically, if the
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c
index cb323a6403..3722eb638b 100644
--- a/src/basic/fs-util.c
+++ b/src/basic/fs-util.c
@@ -824,7 +824,7 @@ int conservative_renameat(
* have the exact same contents and basic file attributes already. In that case remove the new file
* instead. This call is useful for reducing inotify wakeups on files that are updated but don't
* actually change. This function is written in a style that we rather rename too often than suppress
- * too much. i.e. whenever we are in doubt we rather rename than fail. After all reducing inotify
+ * too much. I.e. whenever we are in doubt, we rather rename than fail. After all reducing inotify
* events is an optimization only, not more. */
old_fd = openat(olddirfd, oldpath, O_CLOEXEC|O_RDONLY|O_NOCTTY|O_NOFOLLOW);
diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c
index 3b7cf7a0bf..41af1482bc 100644
--- a/src/basic/mkdir.c
+++ b/src/basic/mkdir.c
@@ -33,11 +33,8 @@ int mkdirat_safe_internal(
assert(_mkdirat && _mkdirat != mkdirat);
r = _mkdirat(dir_fd, path, mode);
- if (r >= 0) {
- r = chmod_and_chown_at(dir_fd, path, mode, uid, gid);
- if (r < 0)
- return r;
- }
+ if (r >= 0)
+ return chmod_and_chown_at(dir_fd, path, mode, uid, gid);
if (r != -EEXIST)
return r;
diff --git a/src/core/service.c b/src/core/service.c
index ae310043f5..df1af81318 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -875,7 +875,6 @@ static int service_load(Unit *u) {
}
static void service_dump(Unit *u, FILE *f, const char *prefix) {
- ServiceExecCommand c;
Service *s = SERVICE(u);
const char *prefix2;
@@ -977,8 +976,7 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) {
kill_context_dump(&s->kill_context, f, prefix);
exec_context_dump(&s->exec_context, f, prefix);
- for (c = 0; c < _SERVICE_EXEC_COMMAND_MAX; c++) {
-
+ for (ServiceExecCommand c = 0; c < _SERVICE_EXEC_COMMAND_MAX; c++) {
if (!s->exec_command[c])
continue;
diff --git a/src/shared/exec-util.c b/src/shared/exec-util.c
index a2e8f428e6..56f16188e1 100644
--- a/src/shared/exec-util.c
+++ b/src/shared/exec-util.c
@@ -427,14 +427,14 @@ int exec_command_flags_to_strv(ExecCommandFlags flags, char ***ex_opts) {
_cleanup_strv_free_ char **ret_opts = NULL;
ExecCommandFlags it = flags;
const char *str;
- int i, r;
+ int r;
assert(ex_opts);
if (flags < 0)
return flags;
- for (i = 0; it != 0; it &= ~(1 << i), i++) {
+ for (unsigned i = 0; it != 0; it &= ~(1 << i), i++)
if (FLAGS_SET(flags, (1 << i))) {
str = exec_command_flags_to_string(1 << i);
if (!str)
@@ -444,7 +444,6 @@ int exec_command_flags_to_strv(ExecCommandFlags flags, char ***ex_opts) {
if (r < 0)
return r;
}
- }
*ex_opts = TAKE_PTR(ret_opts);
@@ -466,9 +465,7 @@ static const char* const exec_command_strings[] = {
};
const char* exec_command_flags_to_string(ExecCommandFlags i) {
- size_t idx;
-
- for (idx = 0; idx < ELEMENTSOF(exec_command_strings); idx++)
+ for (size_t idx = 0; idx < ELEMENTSOF(exec_command_strings); idx++)
if (i == (1 << idx))
return exec_command_strings[idx];