summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strlcpy.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/strlcpy.3')
-rw-r--r--src/lib/libc/string/strlcpy.312
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libc/string/strlcpy.3 b/src/lib/libc/string/strlcpy.3
index b07e30e6ea..03a80e6c79 100644
--- a/src/lib/libc/string/strlcpy.3
+++ b/src/lib/libc/string/strlcpy.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strlcpy.3,v 1.6 1999/09/04 02:22:46 pjanzen Exp $ 1.\" $OpenBSD: strlcpy.3,v 1.7 2000/04/21 15:24:20 aaron Exp $
2.\" 2.\"
3.\" Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> 3.\" Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
4.\" All rights reserved. 4.\" All rights reserved.
@@ -43,7 +43,8 @@ The
43.Fn strlcpy 43.Fn strlcpy
44and 44and
45.Fn strlcat 45.Fn strlcat
46functions copy and concatenate strings respectively. They are designed 46functions copy and concatenate strings respectively.
47They are designed
47to be safer, more consistent, and less error prone replacements for 48to be safer, more consistent, and less error prone replacements for
48.Xr strncpy 3 49.Xr strncpy 3
49and 50and
@@ -55,7 +56,8 @@ and
55take the full size of the buffer (not just the length) and guarantee to 56take the full size of the buffer (not just the length) and guarantee to
56NUL-terminate the result (as long as 57NUL-terminate the result (as long as
57.Fa size 58.Fa size
58is larger than 0). Note that you should include a byte for the NUL in 59is larger than 0).
60Note that you should include a byte for the NUL in
59.Fa size . 61.Fa size .
60.Pp 62.Pp
61The 63The
@@ -82,8 +84,8 @@ The
82.Fn strlcpy 84.Fn strlcpy
83and 85and
84.Fn strlcat 86.Fn strlcat
85functions return the total length of the string they tried to 87functions return the total length of the string they tried to create.
86create. For 88For
87.Fn strlcpy 89.Fn strlcpy
88that means the length of 90that means the length of
89.Fa src . 91.Fa src .