diff options
author | Alexander Shvedov <60114847+a-shvedov@users.noreply.github.com> | 2023-05-22 16:57:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-22 16:57:45 +0300 |
commit | 629edb1e78d791894ce9ee6d53259f95fe1a29af (patch) | |
tree | 3337fbdabebc223c5222b650127af7469a77f693 /include/afl-fuzz.h | |
parent | 8012b555a8cbc49f1c78d4a33cad56ea59280780 (diff) | |
parent | c4b1566ba35c697cda7822bd0cf30e2e3eeee0c7 (diff) | |
download | afl++-629edb1e78d791894ce9ee6d53259f95fe1a29af.tar.gz |
Merge pull request #2 from AFLplusplus/stable
push to stable (#1734)
Diffstat (limited to 'include/afl-fuzz.h')
-rw-r--r-- | include/afl-fuzz.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index 831a0dbc..8fb7ecb1 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -1223,7 +1223,7 @@ double rand_next_percent(afl_state_t *afl); static inline u32 rand_below(afl_state_t *afl, u32 limit) { - if (limit <= 1) return 0; + if (unlikely(limit <= 1)) return 0; /* The boundary not being necessarily a power of 2, we need to ensure the result uniformity. */ @@ -1256,7 +1256,7 @@ static inline u32 rand_below(afl_state_t *afl, u32 limit) { expand havoc mode */ static inline u32 rand_below_datalen(afl_state_t *afl, u32 limit) { - if (limit <= 1) return 0; + if (unlikely(limit <= 1)) return 0; switch (rand_below(afl, 3)) { |