aboutsummaryrefslogtreecommitdiff
path: root/lib/mbstring
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mbstring')
-rw-r--r--lib/mbstring/u8haspfx.c3
-rw-r--r--lib/mbstring/u8hassfx.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/mbstring/u8haspfx.c b/lib/mbstring/u8haspfx.c
index 9b5ae66..b6cea50 100644
--- a/lib/mbstring/u8haspfx.c
+++ b/lib/mbstring/u8haspfx.c
@@ -1,9 +1,10 @@
#include <string.h>
+#include "macros.h"
#include "mbstring.h"
bool
u8haspfx(const char8_t *s, size_t n, const char8_t *pfx, size_t m)
{
- return n >= m && memcmp(s, pfx, m);
+ return n >= m && memeq(s, pfx, m);
}
diff --git a/lib/mbstring/u8hassfx.c b/lib/mbstring/u8hassfx.c
index 8ca5f96..e31bb4b 100644
--- a/lib/mbstring/u8hassfx.c
+++ b/lib/mbstring/u8hassfx.c
@@ -1,9 +1,10 @@
#include <string.h>
+#include "macros.h"
#include "mbstring.h"
bool
u8hassfx(const char8_t *s, size_t n, const char8_t *sfx, size_t m)
{
- return n >= m && memcmp(s + n - m, sfx, m);
+ return n >= m && memeq(s + n - m, sfx, m);
}