diff options
author | Susant Sahani <ssahani@vmware.com> | 2021-01-27 08:19:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 08:19:39 +0100 |
commit | fe96c0f86d15e844d74d539c6cff7f971078cf84 (patch) | |
tree | cb4f1a6248826c163b766c1be5d82d882f9fbb28 /src/basic/rlimit-util.c | |
parent | Merge pull request #18380 from yuwata/test-network-ipv6-proxy-ndp (diff) | |
download | systemd-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/basic/rlimit-util.c')
-rw-r--r-- | src/basic/rlimit-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c index 880976312c..e01ffdb074 100644 --- a/src/basic/rlimit-util.c +++ b/src/basic/rlimit-util.c @@ -50,13 +50,13 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { } int setrlimit_closest_all(const struct rlimit *const *rlim, int *which_failed) { - int i, r; + int r; assert(rlim); /* On failure returns the limit's index that failed in *which_failed, but only if non-NULL */ - for (i = 0; i < _RLIMIT_MAX; i++) { + for (int i = 0; i < _RLIMIT_MAX; i++) { if (!rlim[i]) continue; |