diff options
author | hexcoder- <heiko@hexco.de> | 2021-01-04 15:14:20 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2021-01-04 15:14:20 +0100 |
commit | 33a7d6f1688856c050b0ac71ac1df4018e4d531c (patch) | |
tree | 9e2888ee429ff46ed59feedd39020e9c3bad5b55 /custom_mutators/libfuzzer/FuzzerTracePC.h | |
parent | c423aebb1a6987d8ca58175aee23bc08b611d4c8 (diff) | |
download | afl++-33a7d6f1688856c050b0ac71ac1df4018e4d531c.tar.gz |
code cleanups (from cppcheck)
Diffstat (limited to 'custom_mutators/libfuzzer/FuzzerTracePC.h')
-rw-r--r-- | custom_mutators/libfuzzer/FuzzerTracePC.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/custom_mutators/libfuzzer/FuzzerTracePC.h b/custom_mutators/libfuzzer/FuzzerTracePC.h index 4601300c..a58fdf8d 100644 --- a/custom_mutators/libfuzzer/FuzzerTracePC.h +++ b/custom_mutators/libfuzzer/FuzzerTracePC.h @@ -145,10 +145,10 @@ private: }; Region *Regions; size_t NumRegions; - uint8_t *Start() { return Regions[0].Start; } - uint8_t *Stop() { return Regions[NumRegions - 1].Stop; } - size_t Size() { return Stop() - Start(); } - size_t Idx(uint8_t *P) { + uint8_t *Start() const { return Regions[0].Start; } + uint8_t *Stop() const { return Regions[NumRegions - 1].Stop; } + size_t Size() const { return Stop() - Start(); } + size_t Idx(uint8_t *P) const { assert(P >= Start() && P < Stop()); return P - Start(); } |