/* Copyright 2022-2023 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 . */ #include zap_bool zap_eq(void const * const _lbuf,void const * const _rbuf,zap_sz const _num) { zap_byte const * lbuf; zap_byte const * rbuf; zap_byte * const stop = (zap_byte *)_lbuf + _num; for (lbuf = _lbuf,rbuf = _rbuf;lbuf != stop;++lbuf,++rbuf) { if (*lbuf != *rbuf) { return zap_false; } } return zap_true; }