summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/regex/split.c
diff options
context:
space:
mode:
authorderaadt <>2004-02-28 08:06:47 +0000
committerderaadt <>2004-02-28 08:06:47 +0000
commita16a24f1c5770e130e61c36fa343d0dcd5707972 (patch)
tree6ce1c80791fc75f96129b66d81f38afbd495debd /src/regress/lib/libc/regex/split.c
parent75c3b2d2e6ae84ad1232686b18e5e88996c2cbbe (diff)
downloadopenbsd-a16a24f1c5770e130e61c36fa343d0dcd5707972.tar.gz
openbsd-a16a24f1c5770e130e61c36fa343d0dcd5707972.tar.bz2
openbsd-a16a24f1c5770e130e61c36fa343d0dcd5707972.zip
kill bad functions; some sort of ok from marc who is trying to confuse me
Diffstat (limited to 'src/regress/lib/libc/regex/split.c')
-rw-r--r--src/regress/lib/libc/regex/split.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/regress/lib/libc/regex/split.c b/src/regress/lib/libc/regex/split.c
index 1e17a55b89..f0f72c8b66 100644
--- a/src/regress/lib/libc/regex/split.c
+++ b/src/regress/lib/libc/regex/split.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: split.c,v 1.3 2003/07/31 21:48:03 deraadt Exp $ */ 1/* $OpenBSD: split.c,v 1.4 2004/02/28 08:06:47 deraadt Exp $ */
2/* $NetBSD: split.c,v 1.2 1995/04/20 22:39:57 cgd Exp $ */ 2/* $NetBSD: split.c,v 1.2 1995/04/20 22:39:57 cgd Exp $ */
3 3
4#include <stdio.h> 4#include <stdio.h>
@@ -160,11 +160,11 @@ char *argv[];
160 160
161 if (argc > 4) 161 if (argc > 4)
162 for (n = atoi(argv[3]); n > 0; n--) { 162 for (n = atoi(argv[3]); n > 0; n--) {
163 (void) strcpy(buf, argv[1]); 163 (void) strlcpy(buf, argv[1], sizeof buf);
164 } 164 }
165 else if (argc > 3) 165 else if (argc > 3)
166 for (n = atoi(argv[3]); n > 0; n--) { 166 for (n = atoi(argv[3]); n > 0; n--) {
167 (void) strcpy(buf, argv[1]); 167 (void) strlcpy(buf, argv[1], sizeof buf);
168 (void) split(buf, fields, MNF, argv[2]); 168 (void) split(buf, fields, MNF, argv[2]);
169 } 169 }
170 else if (argc > 2) 170 else if (argc > 2)
@@ -286,7 +286,7 @@ regress()
286 register char *f; 286 register char *f;
287 287
288 for (n = 0; tests[n].str != NULL; n++) { 288 for (n = 0; tests[n].str != NULL; n++) {
289 (void) strcpy(buf, tests[n].str); 289 (void) strlcpy(buf, tests[n].str, sizeof buf);
290 fields[RNF] = NULL; 290 fields[RNF] = NULL;
291 nf = split(buf, fields, RNF, tests[n].seps); 291 nf = split(buf, fields, RNF, tests[n].seps);
292 printit = 0; 292 printit = 0;