diff options
Diffstat (limited to 'lib/string/strlcat.c')
| -rw-r--r-- | lib/string/strlcat.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/string/strlcat.c b/lib/string/strlcat.c deleted file mode 100644 index a61821d..0000000 --- a/lib/string/strlcat.c +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: MIT */ -/* Derived from musl libc (Copyright © 2005-2020 Rich Felker, et al.) */ - -#define _BSD_SOURCE -#include <string.h> - -size_t strlcat(char *d, const char *s, size_t n) -{ - size_t l = strnlen(d, n); - if (l == n) return l + strlen(s); - return l + strlcpy(d+l, s, n-l); -} |
