From 1e9eba6d717ed3132db6b6c232e9d78e0f452568 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 5 Aug 2006 23:09:03 +0000 Subject: Finish the C implementation of rrdui-cgi * Add color support See #77 * Add variable substitutions for environment --- common/compat.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'common/compat.c') 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 */ -- cgit v1.2.3