aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/uthash_strcase.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-12 18:35:59 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-12 18:35:59 +0100
commit80cb19900c3ab36faf92060ea639bccdcda5eaa9 (patch)
tree8158c05411a9ff538535ee50b47454214a644170 /src/libutil/uthash_strcase.h
parent74b182e0166abe108a374495079c2e23cdaceac6 (diff)
downloadrspamd-80cb19900c3ab36faf92060ea639bccdcda5eaa9.tar.gz
rspamd-80cb19900c3ab36faf92060ea639bccdcda5eaa9.zip
[Minor] Fix some ubsan related issues
Diffstat (limited to 'src/libutil/uthash_strcase.h')
-rw-r--r--src/libutil/uthash_strcase.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/uthash_strcase.h b/src/libutil/uthash_strcase.h
index 5d6f2773c..a4418b442 100644
--- a/src/libutil/uthash_strcase.h
+++ b/src/libutil/uthash_strcase.h
@@ -26,7 +26,7 @@
/* Utils for uthash tuning */
#ifndef HASH_CASELESS
#define HASH_FUNCTION(key,keylen,num_bkts,hashv,bkt) do {\
- hashv = rspamd_cryptobox_fast_hash(key, keylen, rspamd_hash_seed ()); \
+ hashv = (__typeof (hashv))rspamd_cryptobox_fast_hash(key, keylen, rspamd_hash_seed ()); \
bkt = (hashv) & (num_bkts-1); \
} while (0)
@@ -78,7 +78,7 @@
rspamd_cryptobox_fast_hash_update (&_hst, &_u, sizeof (_u)); \
break; \
} \
- hashv = rspamd_cryptobox_fast_hash_final (&_hst); \
+ hashv = (__typeof (hashv))rspamd_cryptobox_fast_hash_final (&_hst); \
bkt = (hashv) & (num_bkts-1); \
} while (0)
#define HASH_KEYCMP(a,b,len) rspamd_lc_cmp(a,b,len)