summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl-is-enabled.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2023-10-17 14:35:31 +0200
committerMike Yuan <me@yhndnzj.com>2023-10-18 18:12:27 +0200
commitdef1e20a182fba020b72f34e281110389f706030 (patch)
treee301dfa387d825e355cf16bf4976b636dcdf81c1 /src/systemctl/systemctl-is-enabled.c
parentMerge pull request #29594 from poettering/cgroup-rename-ret-params (diff)
downloadsystemd-def1e20a182fba020b72f34e281110389f706030.tar.xz
systemd-def1e20a182fba020b72f34e281110389f706030.zip
systemctl: minor modernization
Diffstat (limited to 'src/systemctl/systemctl-is-enabled.c')
-rw-r--r--src/systemctl/systemctl-is-enabled.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl/systemctl-is-enabled.c b/src/systemctl/systemctl-is-enabled.c
index 8d791deaf1..01d924f8db 100644
--- a/src/systemctl/systemctl-is-enabled.c
+++ b/src/systemctl/systemctl-is-enabled.c
@@ -24,9 +24,9 @@ static int show_installation_targets_client_side(const char *name) {
if (r < 0)
return log_error_errno(r, "Failed to get file links for %s: %m", name);
- for (size_t i = 0; i < n_changes; i++)
- if (changes[i].type == INSTALL_CHANGE_UNLINK)
- printf(" %s\n", changes[i].path);
+ FOREACH_ARRAY(c, changes, n_changes)
+ if (c->type == INSTALL_CHANGE_UNLINK)
+ printf(" %s\n", c->path);
return 0;
}