summaryrefslogtreecommitdiff
path: root/zap/source/any/mem/eq.c
diff options
context:
space:
mode:
Diffstat (limited to 'zap/source/any/mem/eq.c')
-rw-r--r--zap/source/any/mem/eq.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/zap/source/any/mem/eq.c b/zap/source/any/mem/eq.c
index 3f6cd8e..5ff5c4f 100644
--- a/zap/source/any/mem/eq.c
+++ b/zap/source/any/mem/eq.c
@@ -6,14 +6,10 @@
#include <zap/mem.h>
-zap_i8 zap_eq(void const * const _lbuf,void const * const _rbuf,zap_sz const _num) {
- zap_i8 const * lbuf;
- zap_i8 const * rbuf;
- zap_i8 * const stop = (zap_i8 *)_lbuf + _num;
- for (lbuf = _lbuf,rbuf = _rbuf;lbuf != stop;++lbuf,++rbuf) {
- if (*lbuf != *rbuf) {
- return 0x0u;
- }
- }
+zap_i8 zap_eq(void const * const voidlbuf,void const * const voidrbuf,zap_sz const num) {
+ unsigned char const * lbuf = voidlbuf;
+ unsigned char const * rbuf = voidrbuf;
+ unsigned char const * const stop = lbuf + num;
+ while (lbuf != stop) if (*lbuf++ != *rbuf++) return 0x0u;
return 0x1u;
}