summaryrefslogtreecommitdiffstats
path: root/src/core/dbus-cgroup.c
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@vmware.com>2021-01-27 08:19:39 +0100
committerGitHub <noreply@github.com>2021-01-27 08:19:39 +0100
commitfe96c0f86d15e844d74d539c6cff7f971078cf84 (patch)
treecb4f1a6248826c163b766c1be5d82d882f9fbb28 /src/core/dbus-cgroup.c
parentMerge pull request #18380 from yuwata/test-network-ipv6-proxy-ndp (diff)
downloadsystemd-fe96c0f86d15e844d74d539c6cff7f971078cf84.tar.xz
systemd-fe96c0f86d15e844d74d539c6cff7f971078cf84.zip
treewide: tighten variable scope in loops (#18372)
Also use _cleanup_free_ in one more place.
Diffstat (limited to 'src/core/dbus-cgroup.c')
-rw-r--r--src/core/dbus-cgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
index 37c581fb22..a7d9312d97 100644
--- a/src/core/dbus-cgroup.c
+++ b/src/core/dbus-cgroup.c
@@ -32,7 +32,6 @@ static int property_get_cgroup_mask(
sd_bus_error *error) {
CGroupMask *mask = userdata;
- CGroupController ctrl;
int r;
assert(bus);
@@ -42,7 +41,7 @@ static int property_get_cgroup_mask(
if (r < 0)
return r;
- for (ctrl = 0; ctrl < _CGROUP_CONTROLLER_MAX; ctrl++) {
+ for (CGroupController ctrl = 0; ctrl < _CGROUP_CONTROLLER_MAX; ctrl++) {
if ((*mask & CGROUP_CONTROLLER_TO_MASK(ctrl)) == 0)
continue;