summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1998-11-11 17:12:03 +0000
committerMarc Espie <espie@cvs.openbsd.org>1998-11-11 17:12:03 +0000
commitc5b38b394db05759bbd55a40f38bfdb02580ed64 (patch)
treea72f497fe3b32584ada11c01b61acd581a0b7ab7 /lib/libc
parentb957679f80afa24857b63bd0f400b79ea0224bbb (diff)
Fix `typo', proves that strlcpy/strlcat is a very good idea.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/strlcpy.311
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libc/string/strlcpy.3 b/lib/libc/string/strlcpy.3
index 5ce444d6fab..1e46ef2e90e 100644
--- a/lib/libc/string/strlcpy.3
+++ b/lib/libc/string/strlcpy.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strlcpy.3,v 1.2 1998/07/06 19:17:21 millert Exp $
+.\" $OpenBSD: strlcpy.3,v 1.3 1998/11/11 17:12:02 espie Exp $
.\"
.\" Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
.\" All rights reserved.
@@ -131,9 +131,16 @@ size_t n;
n = strlcpy(pname, dir, sizeof(pname));
if (n >= sizeof(pname))
goto toolong;
-if (strlcpy(pname + n, file, sizeof(pname)) >= sizeof(pname) - n)
+if (strlcpy(pname + n, file, sizeof(pname) - n) >= sizeof(pname) - n)
goto toolong;
.Ed
+.Pp
+However, one may question the validity of such optimizations, as they
+defeat the whole purpose of
+.Fn strlcpy
+and
+.Fn strlcat .
+As a matter of fact, the first version of this manual page got it wrong.
.Sh SEE ALSO
.Xr snprintf 3 ,
.Xr strncpy 3 ,