summaryrefslogtreecommitdiff
path: root/zap/src/mem/memcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'zap/src/mem/memcmp.c')
-rw-r--r--zap/src/mem/memcmp.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/zap/src/mem/memcmp.c b/zap/src/mem/memcmp.c
deleted file mode 100644
index 13fa269..0000000
--- a/zap/src/mem/memcmp.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- Copyright 2022 Gabriel Jensen.
- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
- If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
-*/
-
-#include <zap/priv.h>
-
-#include <zap/mem.h>
-
-zap_cmp zap_memcmp(void const * const _lstr,zap_sz const _num,void const * const _rstr) {
- unsigned char const * lpos = _lstr;
- unsigned char const * rpos = _rstr;
- unsigned char const * const afterlbuf = lpos + _num;
- for (;lpos != afterlbuf;++lpos,++rpos) {
- unsigned char const lbyte = *lpos;
- unsigned char const rbyte = *rpos;
- if (lbyte != rbyte) {return lbyte < rbyte ? zap_lt : zap_gt;}
- }
- return zap_eq;
-}