summaryrefslogtreecommitdiff
path: root/src/lib/libc/string
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string')
-rw-r--r--src/lib/libc/string/strsep.39
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/libc/string/strsep.3 b/src/lib/libc/string/strsep.3
index b15915ab37..33cb2803c5 100644
--- a/src/lib/libc/string/strsep.3
+++ b/src/lib/libc/string/strsep.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strsep.3,v 1.8 2000/04/21 15:24:20 aaron Exp $ 1.\" $OpenBSD: strsep.3,v 1.9 2001/06/14 20:38:38 aaron Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1991, 1993 3.\" Copyright (c) 1990, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -90,9 +90,12 @@ argument vector:
90.Bd -literal -offset indent 90.Bd -literal -offset indent
91char **ap, *argv[10], *inputstring; 91char **ap, *argv[10], *inputstring;
92 92
93for (ap = argv; (*ap = strsep(&inputstring, " \et")) != NULL;) 93for (ap = argv; ap < &argv[9] &&
94 (*ap = strsep(&inputstring, " \et")) != NULL;) {
94 if (**ap != '\e0') 95 if (**ap != '\e0')
95 ++ap; 96 ap++;
97}
98*ap = NULL;
96.Ed 99.Ed
97.Sh HISTORY 100.Sh HISTORY
98The 101The