diff options
Diffstat (limited to 'lib/strncmp.c')
-rw-r--r-- | lib/strncmp.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/strncmp.c b/lib/strncmp.c deleted file mode 100644 index e890517..0000000 --- a/lib/strncmp.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <string.h> - -int strncmp(const char *restrict lhs, const char *restrict rhs, size_t n) -{ - const unsigned char *l = (void *)lhs, *r = (void *)rhs; - if (!n--) - return 0; - for (; *l && *r && n && *l == *r; l++, r++, n--) - ; - return *l - *r; -} |