fix(crypto): fix undefined behaviour of IS_ALIGNED_64 macro

pull/1906/head
Ondřej Vejpustek 3 years ago
parent fb88db41a0
commit f96e737ef5

@ -27,7 +27,7 @@
#define I64(x) x##LL
#define ROTL64(qword, n) ((qword) << (n) ^ ((qword) >> (64 - (n))))
#define le2me_64(x) (x)
#define IS_ALIGNED_64(p) (0 == (7 & ((const char*)(p) - (const char*)0)))
#define IS_ALIGNED_64(p) (0 == (((uintptr_t)(const void *)(p) & 0x7)))
# define me64_to_le_str(to, from, length) memcpy((to), (from), (length))
/* constants */

Loading…
Cancel
Save