diff options
Diffstat (limited to 'openbsd-compat/strlcat.c')
-rw-r--r-- | openbsd-compat/strlcat.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c index d80739fc6..6ff65c19b 100644 --- a/openbsd-compat/strlcat.c +++ b/openbsd-compat/strlcat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: strlcat.c,v 1.5 2001/01/13 16:17:24 millert Exp $ */ | 1 | /* $OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> | 4 | * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> |
@@ -31,7 +31,7 @@ | |||
31 | #ifndef HAVE_STRLCAT | 31 | #ifndef HAVE_STRLCAT |
32 | 32 | ||
33 | #if defined(LIBC_SCCS) && !defined(lint) | 33 | #if defined(LIBC_SCCS) && !defined(lint) |
34 | static char *rcsid = "$OpenBSD: strlcat.c,v 1.5 2001/01/13 16:17:24 millert Exp $"; | 34 | static char *rcsid = "$OpenBSD: strlcat.c,v 1.8 2001/05/13 15:40:15 deraadt Exp $"; |
35 | #endif /* LIBC_SCCS and not lint */ | 35 | #endif /* LIBC_SCCS and not lint */ |
36 | 36 | ||
37 | #include <sys/types.h> | 37 | #include <sys/types.h> |
@@ -42,10 +42,11 @@ static char *rcsid = "$OpenBSD: strlcat.c,v 1.5 2001/01/13 16:17:24 millert Exp | |||
42 | * Appends src to string dst of size siz (unlike strncat, siz is the | 42 | * Appends src to string dst of size siz (unlike strncat, siz is the |
43 | * full size of dst, not space left). At most siz-1 characters | 43 | * full size of dst, not space left). At most siz-1 characters |
44 | * will be copied. Always NUL terminates (unless siz <= strlen(dst)). | 44 | * will be copied. Always NUL terminates (unless siz <= strlen(dst)). |
45 | * Returns strlen(initial dst) + strlen(src); if retval >= siz, | 45 | * Returns strlen(src) + MIN(siz, strlen(initial dst)). |
46 | * truncation occurred. | 46 | * If retval >= siz, truncation occurred. |
47 | */ | 47 | */ |
48 | size_t strlcat(dst, src, siz) | 48 | size_t |
49 | strlcat(dst, src, siz) | ||
49 | char *dst; | 50 | char *dst; |
50 | const char *src; | 51 | const char *src; |
51 | size_t siz; | 52 | size_t siz; |