diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/string/strlcpy.3 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libc/string/strlcpy.3 b/src/lib/libc/string/strlcpy.3 index b392588879..c728c75e51 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.16 2003/06/17 21:56:24 millert Exp $ | 1 | .\" $OpenBSD: strlcpy.3,v 1.17 2005/08/06 03:21:36 jaredy Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> | 3 | .\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> |
| 4 | .\" | 4 | .\" |
| @@ -49,7 +49,7 @@ is larger than 0 or, in the case of | |||
| 49 | .Fn strlcat , | 49 | .Fn strlcat , |
| 50 | as long as there is at least one byte free in | 50 | as long as there is at least one byte free in |
| 51 | .Fa dst ) . | 51 | .Fa dst ) . |
| 52 | Note that you should include a byte for the NUL in | 52 | Note that a byte for the NUL should be included in |
| 53 | .Fa size . | 53 | .Fa size . |
| 54 | Also note that | 54 | Also note that |
| 55 | .Fn strlcpy | 55 | .Fn strlcpy |
| @@ -105,10 +105,10 @@ that means the initial length of | |||
| 105 | plus | 105 | plus |
| 106 | the length of | 106 | the length of |
| 107 | .Fa src . | 107 | .Fa src . |
| 108 | While this may seem somewhat confusing it was done to make | 108 | While this may seem somewhat confusing, it was done to make |
| 109 | truncation detection simple. | 109 | truncation detection simple. |
| 110 | .Pp | 110 | .Pp |
| 111 | Note however, that if | 111 | Note, however, that if |
| 112 | .Fn strlcat | 112 | .Fn strlcat |
| 113 | traverses | 113 | traverses |
| 114 | .Fa size | 114 | .Fa size |
| @@ -152,8 +152,8 @@ if (strlcat(pname, file, sizeof(pname)) >= sizeof(pname)) | |||
| 152 | goto toolong; | 152 | goto toolong; |
| 153 | .Ed | 153 | .Ed |
| 154 | .Pp | 154 | .Pp |
| 155 | Since we know how many characters we copied the first time, we can | 155 | Since it is known how many characters were copied the first time, things |
| 156 | speed things up a bit by using a copy instead of an append: | 156 | can be sped up a bit by using a copy instead of an append: |
| 157 | .Bd -literal -offset indent | 157 | .Bd -literal -offset indent |
| 158 | char *dir, *file, pname[MAXPATHLEN]; | 158 | char *dir, *file, pname[MAXPATHLEN]; |
| 159 | size_t n; | 159 | size_t n; |
