about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-28 23:47:57 +0200
committervan Hauser <vh@thc.org>2020-06-28 23:47:57 +0200
commitc25a602a0370f484e32adbf186290d2504cf3f12 (patch)
treebdde8467d75d1bcc27321b8d4eeea19c623542ad /src
parent81974c4d5e63211744153f2ebcfb246046edbc5b (diff)
downloadafl++-c25a602a0370f484e32adbf186290d2504cf3f12.tar.gz
less problematic definitions
Diffstat (limited to 'src')
-rw-r--r--src/afl-performance.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/afl-performance.c b/src/afl-performance.c
index a3febdbf..b3d30cbd 100644
--- a/src/afl-performance.c
+++ b/src/afl-performance.c
@@ -37,7 +37,7 @@ void rand_set_seed(afl_state_t *afl, s64 init_seed) {
 
   afl->init_seed = init_seed;
   afl->rand_seed[0] =
-      hash64((void *)&afl->init_seed, sizeof(afl->init_seed), HASH_CONST);
+      hash64((u8 *)&afl->init_seed, sizeof(afl->init_seed), HASH_CONST);
   afl->rand_seed[1] = afl->rand_seed[0] ^ 0x1234567890abcdef;
   afl->rand_seed[2] = afl->rand_seed[0] & 0x0123456789abcdef;
   afl->rand_seed[3] = afl->rand_seed[0] | 0x01abcde43f567908;
@@ -141,13 +141,17 @@ void long_jump(afl_state_t *afl) {
 /* we switch from afl's murmur implementation to xxh3 as it is 30% faster -
    and get 64 bit hashes instead of just 32 bit. Less collisions! :-) */
 
-u32 inline hash32(const void *key, u32 len, u32 seed) {
+u32 inline hash32(void *key, u32 len, u32 seed) {
 
   return (u32)XXH64(key, len, seed);
 
 }
 
-u64 inline hash64(const void *key, u32 len, u64 seed) {
+#ifdef _DEBUG
+u64 hash64(u8 *key, u32 len, u64 seed) {
+#else
+u64 inline hash64(u8 *key, u32 len, u64 seed) {
+#endif
 
   return XXH64(key, len, seed);