]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: always used the slow (portable) version of get16bits
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 29 Feb 2016 12:23:25 +0000 (13:23 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 29 Feb 2016 12:23:27 +0000 (13:23 +0100)
This prevents issues with misaligned addresses and undefined sanitizer.

tests/suite/ecore/src/lib/eina_hash.c

index 6877b96fdcc48605b6da946d08488d14d8e14fa4..5af5ee9a283fe98b5b753df111f1909281b6a976 100644 (file)
@@ -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,