summaryrefslogtreecommitdiff
path: root/src/core/device.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/device.c
parent37baf8db563f085e8867a0764f9832dcd7e94605 (diff)
downloadsystemd-fe96c0f86d15e844d74d539c6cff7f971078cf84.tar.gz
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.c3
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;