diff options
Diffstat (limited to 'common/compat.c')
-rw-r--r-- | common/compat.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/common/compat.c b/common/compat.c index c6138d0..50a2be7 100644 --- a/common/compat.c +++ b/common/compat.c @@ -136,15 +136,8 @@ strtob(const char* str) size_t strlcpy(char *dst, const char *src, size_t len) { - size_t ret = strlen(dst); - - while (len > 1) { - *dst++ = *src++; - len--; - } - if (len > 0) - *dst = '\0'; - return (ret); + *dst = 0; + return strlcat(dst, src, len); } #endif /* HAVE_STRLCPY */ |