diff options
author | Stef Walter <stef@memberwebs.com> | 2006-08-05 23:09:03 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-08-05 23:09:03 +0000 |
commit | 1e9eba6d717ed3132db6b6c232e9d78e0f452568 (patch) | |
tree | b01c5bffd4999a5eb02410b59be1c9dc6698175a /common/compat.c | |
parent | 8f2e6fc5fe651d67e419b69749a29223866fcb10 (diff) |
Finish the C implementation of rrdui-cgi
* Add color support See #77
* Add variable substitutions for environment
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 */ |