diff options
author | millert <> | 2013-09-30 12:02:35 +0000 |
---|---|---|
committer | millert <> | 2013-09-30 12:02:35 +0000 |
commit | 362b96a0554ddbc24305e3d4835efe41c2d73b81 (patch) | |
tree | 0f446346af2173e4d290cb18e59c199e46eb19e2 /src/lib/libc/string/strlcpy.3 | |
parent | d2c4b95c0364ddb27d57c0d976621efe6b37c36f (diff) | |
download | openbsd-362b96a0554ddbc24305e3d4835efe41c2d73b81.tar.gz openbsd-362b96a0554ddbc24305e3d4835efe41c2d73b81.tar.bz2 openbsd-362b96a0554ddbc24305e3d4835efe41c2d73b81.zip |
Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN,
MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
Diffstat (limited to 'src/lib/libc/string/strlcpy.3')
-rw-r--r-- | src/lib/libc/string/strlcpy.3 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libc/string/strlcpy.3 b/src/lib/libc/string/strlcpy.3 index a7cd269819..044c959c0c 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.25 2013/09/25 21:49:31 millert Exp $ | 1 | .\" $OpenBSD: strlcpy.3,v 1.26 2013/09/30 12:02:35 millert 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 | .\" |
@@ -14,7 +14,7 @@ | |||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | .\" | 16 | .\" |
17 | .Dd $Mdocdate: September 25 2013 $ | 17 | .Dd $Mdocdate: September 30 2013 $ |
18 | .Dt STRLCPY 3 | 18 | .Dt STRLCPY 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -138,7 +138,7 @@ char *s, *p, buf[BUFSIZ]; | |||
138 | To detect truncation, perhaps while building a pathname, something | 138 | To detect truncation, perhaps while building a pathname, something |
139 | like the following might be used: | 139 | like the following might be used: |
140 | .Bd -literal -offset indent | 140 | .Bd -literal -offset indent |
141 | char *dir, *file, pname[MAXPATHLEN]; | 141 | char *dir, *file, pname[PATH_MAX]; |
142 | 142 | ||
143 | \&... | 143 | \&... |
144 | 144 | ||
@@ -151,7 +151,7 @@ if (strlcat(pname, file, sizeof(pname)) >= sizeof(pname)) | |||
151 | Since it is known how many characters were copied the first time, things | 151 | Since it is known how many characters were copied the first time, things |
152 | can be sped up a bit by using a copy instead of an append: | 152 | can be sped up a bit by using a copy instead of an append: |
153 | .Bd -literal -offset indent | 153 | .Bd -literal -offset indent |
154 | char *dir, *file, pname[MAXPATHLEN]; | 154 | char *dir, *file, pname[PATH_MAX]; |
155 | size_t n; | 155 | size_t n; |
156 | 156 | ||
157 | \&... | 157 | \&... |