mirror of
https://github.com/clearlinux/graphene.git
synced 2026-08-28 21:35:52 +00:00
17 lines
333 B
C
17 lines
333 B
C
/* SPDX-License-Identifier: LGPL-3.0-or-later */
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "api.h"
|
|
|
|
int memcmp(const void* lhs, const void* rhs, size_t count) {
|
|
const unsigned char* l = lhs;
|
|
const unsigned char* r = rhs;
|
|
while (count && *l == *r) {
|
|
count--;
|
|
l++;
|
|
r++;
|
|
}
|
|
return count ? *l - *r : 0;
|
|
}
|