summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-02-29 13:23:25 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-02-29 13:23:27 +0100
commitb351bbf123586e0c115c201c0fc5aa9967d7571c (patch)
treef0bbdcbf6e16e210037c57244d42db15341ab3b6
parent1010496d4a1c101ab759bbea6c010503398554b5 (diff)
downloadgnutls-b351bbf123586e0c115c201c0fc5aa9967d7571c.tar.gz
tests: always used the slow (portable) version of get16bits
This prevents issues with misaligned addresses and undefined sanitizer.
-rw-r--r--tests/suite/ecore/src/lib/eina_hash.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/suite/ecore/src/lib/eina_hash.c b/tests/suite/ecore/src/lib/eina_hash.c
index 6877b96fdc..5af5ee9a28 100644
--- a/tests/suite/ecore/src/lib/eina_hash.c
+++ b/tests/suite/ecore/src/lib/eina_hash.c
@@ -131,16 +131,8 @@ struct _Eina_Hash_Each {
const void *data;
};
-#undef get16bits
-#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
- || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
-#define get16bits(d) (*((const uint16_t *)(d)))
-#endif
-
-#if !defined (get16bits)
#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \
+ (uint32_t)(((const uint8_t *)(d))[0]))
-#endif
static inline int
_eina_hash_hash_rbtree_cmp_hash(const Eina_Hash_Head * hash_head,