summaryrefslogtreecommitdiffstats
path: root/src/core/target.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/target.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/target.c')
-rw-r--r--src/core/target.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/target.c b/src/core/target.c
index a422056803..5755f26615 100644
--- a/src/core/target.c
+++ b/src/core/target.c
@@ -45,7 +45,6 @@ static int target_add_default_dependencies(Target *t) {
};
int r;
- unsigned k;
assert(t);
@@ -55,7 +54,7 @@ static int target_add_default_dependencies(Target *t) {
/* Imply ordering for requirement dependencies on target units. Note that when the user created a contradicting
* ordering manually we won't add anything in here to make sure we don't create a loop. */
- for (k = 0; k < ELEMENTSOF(deps); k++) {
+ for (size_t k = 0; k < ELEMENTSOF(deps); k++) {
Unit *other;
void *v;