From 6979f76ff66df9c48444c26e6e777f1e33cfd762 Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Tue, 24 Jul 2001 11:34:22 +0000 Subject: [PATCH] Sync to OpenBSD (update comment and minor style change). Obtained from: OpenBSD MFC after: 1 week --- lib/libc/string/strlcat.c | 7 ++++--- sys/libkern/strlcat.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/libc/string/strlcat.c b/lib/libc/string/strlcat.c index c325ef332f3d..405389c9940e 100644 --- a/lib/libc/string/strlcat.c +++ b/lib/libc/string/strlcat.c @@ -42,10 +42,11 @@ static const char rcsid[] = * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). - * Returns strlen(initial dst) + strlen(src); if retval >= siz, - * truncation occurred. + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. */ -size_t strlcat(dst, src, siz) +size_t +strlcat(dst, src, siz) char *dst; const char *src; size_t siz; diff --git a/sys/libkern/strlcat.c b/sys/libkern/strlcat.c index c325ef332f3d..405389c9940e 100644 --- a/sys/libkern/strlcat.c +++ b/sys/libkern/strlcat.c @@ -42,10 +42,11 @@ static const char rcsid[] = * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). - * Returns strlen(initial dst) + strlen(src); if retval >= siz, - * truncation occurred. + * Returns strlen(src) + MIN(siz, strlen(initial dst)). + * If retval >= siz, truncation occurred. */ -size_t strlcat(dst, src, siz) +size_t +strlcat(dst, src, siz) char *dst; const char *src; size_t siz;