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/core/device.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/core/device.c')
-rw-r--r-- | src/core/device.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/device.c b/src/core/device.c index cbfb87a808..db39479c8f 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -193,11 +193,10 @@ static const struct { static int device_found_to_string_many(DeviceFound flags, char **ret) { _cleanup_free_ char *s = NULL; - unsigned i; assert(ret); - for (i = 0; i < ELEMENTSOF(device_found_map); i++) { + for (size_t i = 0; i < ELEMENTSOF(device_found_map); i++) { if (!FLAGS_SET(flags, device_found_map[i].flag)) continue; |