summaryrefslogtreecommitdiffstats
path: root/src/fuzz
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/fuzz
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/fuzz')
-rw-r--r--src/fuzz/fuzz-main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fuzz/fuzz-main.c b/src/fuzz/fuzz-main.c
index 2df2993cbf..c39db5d59d 100644
--- a/src/fuzz/fuzz-main.c
+++ b/src/fuzz/fuzz-main.c
@@ -18,14 +18,14 @@
#define MIN_NUMBER_OF_RUNS 4
int main(int argc, char **argv) {
- int i, r;
- size_t size;
- char *name;
+ int r;
test_setup_logging(LOG_DEBUG);
- for (i = 1; i < argc; i++) {
+ for (int i = 1; i < argc; i++) {
_cleanup_free_ char *buf = NULL;
+ size_t size;
+ char *name;
name = argv[i];
r = read_full_file(name, &buf, &size);