diff options
author | vanhauser-thc <vh@thc.org> | 2021-12-15 20:43:18 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-12-15 20:43:18 +0100 |
commit | 9f911bf0bdad0c2283ad880d6ea83f586dd5b510 (patch) | |
tree | ce98e379bd8820d3a533283283c94d7e8cda4823 /src/afl-tmin.c | |
parent | 88814be474e9b842ad1859d806631d427cb349de (diff) | |
download | afl++-9f911bf0bdad0c2283ad880d6ea83f586dd5b510.tar.gz |
cleanup of TIMES macro
Diffstat (limited to 'src/afl-tmin.c')
-rw-r--r-- | src/afl-tmin.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/afl-tmin.c b/src/afl-tmin.c index 89546c45..b5b015ce 100644 --- a/src/afl-tmin.c +++ b/src/afl-tmin.c @@ -95,31 +95,20 @@ static sharedmem_t * shm_fuzz; /* Classify tuple counts. This is a slow & naive version, but good enough here. */ -#define TIMES4(x) x, x, x, x -#define TIMES8(x) TIMES4(x), TIMES4(x) -#define TIMES16(x) TIMES8(x), TIMES8(x) -#define TIMES32(x) TIMES16(x), TIMES16(x) -#define TIMES64(x) TIMES32(x), TIMES32(x) static const u8 count_class_lookup[256] = { [0] = 0, [1] = 1, [2] = 2, [3] = 4, - [4] = TIMES4(8), - [8] = TIMES8(16), - [16] = TIMES16(32), - [32] = TIMES32(64), - [128] = TIMES64(128) + [4 ... 7] = 8, + [8 ... 15] = 16, + [16 ... 31] = 32, + [32 ... 127] = 64, + [128 ... 255] = 128 }; -#undef TIMES64 -#undef TIMES32 -#undef TIMES16 -#undef TIMES8 -#undef TIMES4 - static void kill_child() { if (fsrv->child_pid > 0) { |