[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
typo in strcpy.3 ?
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: typo in strcpy.3 ?
- From: Maxim Bourmistrov <maxim_(_at_)_student_(_dot_)_chalmers_(_dot_)_se>
- Date: Sat, 10 Dec 2005 00:25:59 +0100
char buf[BUFSIZ] should be char buf[BUFSIZE]?
# cat /tmp/diff
--- lib/libc/string/strcpy.3.orig Sat Dec 10 00:23:29 2005
+++ lib/libc/string/strcpy.3 Sat Dec 10 00:23:47 2005
@@ -121,7 +121,7 @@
.Em not
guarantee to NUL terminate the string itself, it must be done by hand.
.Bd -literal -offset indent
-char buf[BUFSIZ];
+char buf[BUFSIZE];
(void)strncpy(buf, input, sizeof(buf) - 1);
buf[sizeof(buf) - 1] = '\e0';
#
--
Best regards
Maxim Bourmistrov
Visit your host, monkey.org