summaryrefslogtreecommitdiff
path: root/lib/string/strncmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/string/strncmp.c')
-rw-r--r--lib/string/strncmp.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/string/strncmp.c b/lib/string/strncmp.c
deleted file mode 100644
index b98473b..0000000
--- a/lib/string/strncmp.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/* Derived from musl libc (Copyright © 2005-2020 Rich Felker, et al.) */
-
-#include <string.h>
-
-int strncmp(const char *_l, const char *_r, size_t n)
-{
- const unsigned char *l=(void *)_l, *r=(void *)_r;
- if (!n--) return 0;
- for (; *l && *r && n && *l == *r ; l++, r++, n--);
- return *l - *r;
-}