diff options
author | hexcoder- <heiko@hexco.de> | 2020-09-04 22:26:39 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-09-04 22:26:39 +0200 |
commit | 0625eb0a051247c7b39df987289ad9a0e089a181 (patch) | |
tree | ce36b004b31d8e441a11d727512632e4699d54ac /src/afl-fuzz-stats.c | |
parent | 77b824d1014c3fb11804a2e91d28d155cd0f62d1 (diff) | |
download | afl++-0625eb0a051247c7b39df987289ad9a0e089a181.tar.gz |
avoid signed ints for amounts (which are positive)
Diffstat (limited to 'src/afl-fuzz-stats.c')
-rw-r--r-- | src/afl-fuzz-stats.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index 05cbafef..07d83f07 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -29,20 +29,20 @@ /* Write fuzzer setup file */ -void write_setup_file(afl_state_t *afl, int argc, char **argv) { +void write_setup_file(afl_state_t *afl, u32 argc, char **argv) { char *val; u8 fn[PATH_MAX]; snprintf(fn, PATH_MAX, "%s/fuzzer_setup", afl->out_dir); FILE *f = create_ffile(fn); - s32 i; + u32 i; fprintf(f, "# environment variables:\n"); - s32 s_afl_env = (s32) + u32 s_afl_env = sizeof(afl_environment_variables) / sizeof(afl_environment_variables[0]) - - 1; + 1U; - for (i = 0; i < s_afl_env; i++) { + for (i = 0; i < s_afl_env; ++i) { if ((val = getenv(afl_environment_variables[i])) != NULL) { @@ -55,7 +55,7 @@ void write_setup_file(afl_state_t *afl, int argc, char **argv) { fprintf(f, "# command line:\n"); size_t j; - for (i = 0; i < argc; i++) { + for (i = 0; i < argc; ++i) { if (i) fprintf(f, " "); if (index(argv[i], '\'')) { |