diff options
Diffstat (limited to 'na/lib/string/strncmp.c')
| -rw-r--r-- | na/lib/string/strncmp.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/na/lib/string/strncmp.c b/na/lib/string/strncmp.c deleted file mode 100644 index b98473b..0000000 --- a/na/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; -} |
