diff options
Diffstat (limited to 'zap/src/memeq.c')
-rw-r--r-- | zap/src/memeq.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/zap/src/memeq.c b/zap/src/memeq.c index 75ecc12..7dce213 100644 --- a/zap/src/memeq.c +++ b/zap/src/memeq.c @@ -6,11 +6,13 @@ #include <zap/priv.h> +#include <zap/mem.h> + #include <stdbool.h> #include <stddef.h> #include <stdint.h> -#if defined(zap_priv_fastimpl) +#if zap_priv_fastimpl __asm__ ( ".globl zap_memeq\n" @@ -101,9 +103,9 @@ __asm__ ( ); #else bool zap_memeq(void const * const _lptr,size_t const _num,void const * const _rptr) { - uint_least8_t const * lpos = (uint_least8_t const *)_lptr; - uint_least8_t const * rpos = (uint_least8_t const *)_rptr; - uint_least8_t const * const afterbuf = lpos + _num; + unsigned char const * lpos = _lptr; + unsigned char const * rpos = _rptr; + unsigned char const * const afterbuf = lpos + _num; for (;lpos != afterbuf;++lpos,++rpos) {sus_likely (*lpos != *rpos) {return false;}} return true; } |