diff options
| author | deraadt <> | 2003-07-31 21:48:04 +0000 |
|---|---|---|
| committer | deraadt <> | 2003-07-31 21:48:04 +0000 |
| commit | 33c506bfed3ead4cc96819ce600895082c214755 (patch) | |
| tree | f684ac5f268a986ffa67596e223c418beaac533a /src | |
| parent | 1e17357c09b2a156a0fa1407b68c4158394b9d7e (diff) | |
| download | openbsd-33c506bfed3ead4cc96819ce600895082c214755.tar.gz openbsd-33c506bfed3ead4cc96819ce600895082c214755.tar.bz2 openbsd-33c506bfed3ead4cc96819ce600895082c214755.zip | |
various cleanups; david says results are same
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libc/alloca/alloca.c | 4 | ||||
| -rw-r--r-- | src/regress/lib/libc/atexit/atexit_test.c | 22 | ||||
| -rw-r--r-- | src/regress/lib/libc/db/dbtest.c | 10 | ||||
| -rw-r--r-- | src/regress/lib/libc/ieeefp/except/except.c | 16 | ||||
| -rw-r--r-- | src/regress/lib/libc/ieeefp/inf/inf.c | 4 | ||||
| -rw-r--r-- | src/regress/lib/libc/ieeefp/round/round.c | 4 | ||||
| -rw-r--r-- | src/regress/lib/libc/malloc/malloc0test/malloc0test.c | 6 | ||||
| -rw-r--r-- | src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c | 4 | ||||
| -rw-r--r-- | src/regress/lib/libc/regex/debug.c | 6 | ||||
| -rw-r--r-- | src/regress/lib/libc/regex/main.c | 29 | ||||
| -rw-r--r-- | src/regress/lib/libc/regex/split.c | 10 | ||||
| -rw-r--r-- | src/regress/lib/libc/setjmp/jmptest.c | 11 | ||||
| -rw-r--r-- | src/regress/lib/libc/sigreturn/sigret.c | 8 |
13 files changed, 64 insertions, 70 deletions
diff --git a/src/regress/lib/libc/alloca/alloca.c b/src/regress/lib/libc/alloca/alloca.c index c8a6b6b40c..1c26429293 100644 --- a/src/regress/lib/libc/alloca/alloca.c +++ b/src/regress/lib/libc/alloca/alloca.c | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | /* $OpenBSD: alloca.c,v 1.3 2003/07/31 03:23:41 mickey Exp $ */ | 1 | /* $OpenBSD: alloca.c,v 1.4 2003/07/31 21:48:02 deraadt Exp $ */ |
| 2 | 2 | ||
| 3 | /* Written by Michael Shalayeff, 2003, Public Domain. */ | 3 | /* Written by Michael Shalayeff, 2003, Public Domain. */ |
| 4 | 4 | ||
| 5 | #include <stdio.h> | 5 | #include <stdio.h> |
| 6 | 6 | ||
| 7 | int | 7 | int |
| 8 | main() | 8 | main(int argc, char *argv[]) |
| 9 | { | 9 | { |
| 10 | char *q, *p; | 10 | char *q, *p; |
| 11 | 11 | ||
diff --git a/src/regress/lib/libc/atexit/atexit_test.c b/src/regress/lib/libc/atexit/atexit_test.c index df316e3372..c30b9dff77 100644 --- a/src/regress/lib/libc/atexit/atexit_test.c +++ b/src/regress/lib/libc/atexit/atexit_test.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: atexit_test.c,v 1.3 2002/10/21 20:40:50 mickey Exp $ */ | 1 | /* $OpenBSD: atexit_test.c,v 1.4 2003/07/31 21:48:02 deraadt Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 2002 Daniel Hartmeier | 4 | * Copyright (c) 2002 Daniel Hartmeier |
| @@ -39,11 +39,11 @@ | |||
| 39 | #include <signal.h> | 39 | #include <signal.h> |
| 40 | #include "stdlib/atexit.h" | 40 | #include "stdlib/atexit.h" |
| 41 | 41 | ||
| 42 | void handle_first(); | 42 | void handle_first(void); |
| 43 | void handle_middle(); | 43 | void handle_middle(void); |
| 44 | void handle_last(); | 44 | void handle_last(void); |
| 45 | void handle_invalid(); | 45 | void handle_invalid(void); |
| 46 | void handle_cleanup(); | 46 | void handle_cleanup(void); |
| 47 | void handle_signal(int); | 47 | void handle_signal(int); |
| 48 | 48 | ||
| 49 | static int counter; | 49 | static int counter; |
| @@ -96,31 +96,31 @@ main(int argc, char *argv[]) | |||
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | void | 98 | void |
| 99 | handle_first() | 99 | handle_first(void) |
| 100 | { | 100 | { |
| 101 | fprintf(stderr, "handle_first() counter == %i\n", counter); | 101 | fprintf(stderr, "handle_first() counter == %i\n", counter); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | void | 104 | void |
| 105 | handle_middle() | 105 | handle_middle(void) |
| 106 | { | 106 | { |
| 107 | counter++; | 107 | counter++; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | void | 110 | void |
| 111 | handle_last() | 111 | handle_last(void) |
| 112 | { | 112 | { |
| 113 | fprintf(stderr, "handle_last() counter == %i\n", counter); | 113 | fprintf(stderr, "handle_last() counter == %i\n", counter); |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | void | 116 | void |
| 117 | handle_cleanup() | 117 | handle_cleanup(void) |
| 118 | { | 118 | { |
| 119 | fprintf(stderr, "handle_cleanup()\n"); | 119 | fprintf(stderr, "handle_cleanup()\n"); |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void | 122 | void |
| 123 | handle_invalid() | 123 | handle_invalid(void) |
| 124 | { | 124 | { |
| 125 | fprintf(stderr, "handle_invalid() THIS SHOULD HAVE SEGFAULTED INSTEAD!\n"); | 125 | fprintf(stderr, "handle_invalid() THIS SHOULD HAVE SEGFAULTED INSTEAD!\n"); |
| 126 | } | 126 | } |
diff --git a/src/regress/lib/libc/db/dbtest.c b/src/regress/lib/libc/db/dbtest.c index 0cefba3e1f..8eda40d6b3 100644 --- a/src/regress/lib/libc/db/dbtest.c +++ b/src/regress/lib/libc/db/dbtest.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dbtest.c,v 1.10 2003/06/02 19:38:25 millert Exp $ */ | 1 | /* $OpenBSD: dbtest.c,v 1.11 2003/07/31 21:48:02 deraadt Exp $ */ |
| 2 | /* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */ | 2 | /* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */ |
| 3 | 3 | ||
| 4 | /*- | 4 | /*- |
| @@ -40,7 +40,7 @@ static char copyright[] = | |||
| 40 | #if 0 | 40 | #if 0 |
| 41 | static char sccsid[] = "@(#)dbtest.c 8.17 (Berkeley) 9/1/94"; | 41 | static char sccsid[] = "@(#)dbtest.c 8.17 (Berkeley) 9/1/94"; |
| 42 | #else | 42 | #else |
| 43 | static char rcsid[] = "$OpenBSD: dbtest.c,v 1.10 2003/06/02 19:38:25 millert Exp $"; | 43 | static char rcsid[] = "$OpenBSD: dbtest.c,v 1.11 2003/07/31 21:48:02 deraadt Exp $"; |
| 44 | #endif | 44 | #endif |
| 45 | #endif /* not lint */ | 45 | #endif /* not lint */ |
| 46 | 46 | ||
| @@ -88,9 +88,7 @@ DB *XXdbp; /* Global for gdb. */ | |||
| 88 | int XXlineno; /* Fast breakpoint for gdb. */ | 88 | int XXlineno; /* Fast breakpoint for gdb. */ |
| 89 | 89 | ||
| 90 | int | 90 | int |
| 91 | main(argc, argv) | 91 | main(int argc, char *argv[]) |
| 92 | int argc; | ||
| 93 | char *argv[]; | ||
| 94 | { | 92 | { |
| 95 | extern int optind; | 93 | extern int optind; |
| 96 | extern char *optarg; | 94 | extern char *optarg; |
| @@ -158,7 +156,7 @@ main(argc, argv) | |||
| 158 | p = getenv("TMPDIR"); | 156 | p = getenv("TMPDIR"); |
| 159 | if (p == NULL) | 157 | if (p == NULL) |
| 160 | p = "/var/tmp"; | 158 | p = "/var/tmp"; |
| 161 | (void)sprintf(buf, "%s/__dbtest", p); | 159 | (void)snprintf(buf, sizeof buf, "%s/__dbtest", p); |
| 162 | fname = buf; | 160 | fname = buf; |
| 163 | (void)unlink(buf); | 161 | (void)unlink(buf); |
| 164 | } else if (!sflag) | 162 | } else if (!sflag) |
diff --git a/src/regress/lib/libc/ieeefp/except/except.c b/src/regress/lib/libc/ieeefp/except/except.c index 6b65e8f3c4..7ab8fc4cb2 100644 --- a/src/regress/lib/libc/ieeefp/except/except.c +++ b/src/regress/lib/libc/ieeefp/except/except.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: except.c,v 1.3 2001/01/29 02:05:42 niklas Exp $ */ | 1 | /* $OpenBSD: except.c,v 1.4 2003/07/31 21:48:03 deraadt Exp $ */ |
| 2 | 2 | ||
| 3 | #include <stdio.h> | 3 | #include <stdio.h> |
| 4 | #include <signal.h> | 4 | #include <signal.h> |
| @@ -6,7 +6,6 @@ | |||
| 6 | #include <ieeefp.h> | 6 | #include <ieeefp.h> |
| 7 | #include <float.h> | 7 | #include <float.h> |
| 8 | 8 | ||
| 9 | void sigfpe(); | ||
| 10 | volatile sig_atomic_t signal_cought; | 9 | volatile sig_atomic_t signal_cought; |
| 11 | 10 | ||
| 12 | static volatile const double one = 1.0; | 11 | static volatile const double one = 1.0; |
| @@ -14,8 +13,14 @@ static volatile const double zero = 0.0; | |||
| 14 | static volatile const double huge = DBL_MAX; | 13 | static volatile const double huge = DBL_MAX; |
| 15 | static volatile const double tiny = DBL_MIN; | 14 | static volatile const double tiny = DBL_MIN; |
| 16 | 15 | ||
| 16 | static void | ||
| 17 | sigfpe(int signo) | ||
| 18 | { | ||
| 19 | signal_cought = 1; | ||
| 20 | } | ||
| 21 | |||
| 17 | int | 22 | int |
| 18 | main() | 23 | main(int argc, char *argv[]) |
| 19 | { | 24 | { |
| 20 | volatile double x; | 25 | volatile double x; |
| 21 | 26 | ||
| @@ -83,8 +88,3 @@ main() | |||
| 83 | exit(0); | 88 | exit(0); |
| 84 | } | 89 | } |
| 85 | 90 | ||
| 86 | void | ||
| 87 | sigfpe() | ||
| 88 | { | ||
| 89 | signal_cought = 1; | ||
| 90 | } | ||
diff --git a/src/regress/lib/libc/ieeefp/inf/inf.c b/src/regress/lib/libc/ieeefp/inf/inf.c index b6116b0df1..a1956145a6 100644 --- a/src/regress/lib/libc/ieeefp/inf/inf.c +++ b/src/regress/lib/libc/ieeefp/inf/inf.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: inf.c,v 1.2 2002/02/18 11:24:13 art Exp $ */ | 1 | /* $OpenBSD: inf.c,v 1.3 2003/07/31 21:48:03 deraadt Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Peter Valchev <pvalchev@openbsd.org> Public Domain, 2002. | 4 | * Peter Valchev <pvalchev@openbsd.org> Public Domain, 2002. |
| @@ -7,7 +7,7 @@ | |||
| 7 | #include <math.h> | 7 | #include <math.h> |
| 8 | 8 | ||
| 9 | int | 9 | int |
| 10 | main() | 10 | main(int argc, char *argv[]) |
| 11 | { | 11 | { |
| 12 | if (isinf(HUGE_VAL)) | 12 | if (isinf(HUGE_VAL)) |
| 13 | return 0; | 13 | return 0; |
diff --git a/src/regress/lib/libc/ieeefp/round/round.c b/src/regress/lib/libc/ieeefp/round/round.c index 086c4fdf10..807941ea56 100644 --- a/src/regress/lib/libc/ieeefp/round/round.c +++ b/src/regress/lib/libc/ieeefp/round/round.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: round.c,v 1.2 2001/01/29 02:05:43 niklas Exp $ */ | 1 | /* $OpenBSD: round.c,v 1.3 2003/07/31 21:48:03 deraadt Exp $ */ |
| 2 | /* $NetBSD: round.c,v 1.1 1995/04/26 00:27:28 jtc Exp $ */ | 2 | /* $NetBSD: round.c,v 1.1 1995/04/26 00:27:28 jtc Exp $ */ |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <float.h> | 12 | #include <float.h> |
| 13 | 13 | ||
| 14 | int | 14 | int |
| 15 | main() | 15 | main(int argc, char *argv[]) |
| 16 | { | 16 | { |
| 17 | /* | 17 | /* |
| 18 | * This test would be better if it actually performed some | 18 | * This test would be better if it actually performed some |
diff --git a/src/regress/lib/libc/malloc/malloc0test/malloc0test.c b/src/regress/lib/libc/malloc/malloc0test/malloc0test.c index 39c3fd2e64..910b466bd4 100644 --- a/src/regress/lib/libc/malloc/malloc0test/malloc0test.c +++ b/src/regress/lib/libc/malloc/malloc0test/malloc0test.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: malloc0test.c,v 1.1 2003/07/15 10:09:37 otto Exp $ */ | 1 | /* $OpenBSD: malloc0test.c,v 1.2 2003/07/31 21:48:03 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Public domain. 2001, Theo de Raadt | 3 | * Public domain. 2001, Theo de Raadt |
| 4 | */ | 4 | */ |
| @@ -14,14 +14,14 @@ | |||
| 14 | volatile sig_atomic_t got; | 14 | volatile sig_atomic_t got; |
| 15 | jmp_buf jmp; | 15 | jmp_buf jmp; |
| 16 | 16 | ||
| 17 | void | 17 | static void |
| 18 | catch(int signo) | 18 | catch(int signo) |
| 19 | { | 19 | { |
| 20 | got++; | 20 | got++; |
| 21 | longjmp(jmp, 1); | 21 | longjmp(jmp, 1); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | int | 24 | static int |
| 25 | test(char *p, int size) | 25 | test(char *p, int size) |
| 26 | { | 26 | { |
| 27 | signal(SIGSEGV, catch); | 27 | signal(SIGSEGV, catch); |
diff --git a/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c b/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c index 61d85e5d41..1232dd660d 100644 --- a/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c +++ b/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: malloc_errno.c,v 1.1 2003/07/15 10:06:31 otto Exp $ */ | 1 | /* $OpenBSD: malloc_errno.c,v 1.2 2003/07/31 21:48:03 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Public domain. 2003, Otto Moerbeek | 3 | * Public domain. 2003, Otto Moerbeek |
| 4 | */ | 4 | */ |
| @@ -30,7 +30,7 @@ testerrno(size_t sz) | |||
| 30 | * correctly. | 30 | * correctly. |
| 31 | */ | 31 | */ |
| 32 | int | 32 | int |
| 33 | main() | 33 | main(int argc, char *argv[]) |
| 34 | { | 34 | { |
| 35 | size_t i; | 35 | size_t i; |
| 36 | 36 | ||
diff --git a/src/regress/lib/libc/regex/debug.c b/src/regress/lib/libc/regex/debug.c index 7834e970c7..11129e7249 100644 --- a/src/regress/lib/libc/regex/debug.c +++ b/src/regress/lib/libc/regex/debug.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: debug.c,v 1.3 2001/01/29 02:05:43 niklas Exp $ */ | 1 | /* $OpenBSD: debug.c,v 1.4 2003/07/31 21:48:03 deraadt Exp $ */ |
| 2 | /* $NetBSD: debug.c,v 1.2 1995/04/20 22:39:42 cgd Exp $ */ | 2 | /* $NetBSD: debug.c,v 1.2 1995/04/20 22:39:42 cgd Exp $ */ |
| 3 | 3 | ||
| 4 | #include <stdio.h> | 4 | #include <stdio.h> |
| @@ -238,8 +238,8 @@ int ch; | |||
| 238 | static char buf[10]; | 238 | static char buf[10]; |
| 239 | 239 | ||
| 240 | if (isprint(ch) || ch == ' ') | 240 | if (isprint(ch) || ch == ' ') |
| 241 | sprintf(buf, "%c", ch); | 241 | snprintf(buf, sizeof buf, "%c", ch); |
| 242 | else | 242 | else |
| 243 | sprintf(buf, "\\%o", ch); | 243 | snprintf(buf, sizeof buf, "\\%o", ch); |
| 244 | return(buf); | 244 | return(buf); |
| 245 | } | 245 | } |
diff --git a/src/regress/lib/libc/regex/main.c b/src/regress/lib/libc/regex/main.c index 6e63ffc235..02f4bd7cf2 100644 --- a/src/regress/lib/libc/regex/main.c +++ b/src/regress/lib/libc/regex/main.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: main.c,v 1.3 1997/01/15 23:41:07 millert Exp $ */ | 1 | /* $OpenBSD: main.c,v 1.4 2003/07/31 21:48:03 deraadt Exp $ */ |
| 2 | /* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ | 2 | /* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ |
| 3 | 3 | ||
| 4 | #include <stdio.h> | 4 | #include <stdio.h> |
| @@ -22,16 +22,15 @@ regoff_t startoff = 0; | |||
| 22 | regoff_t endoff = 0; | 22 | regoff_t endoff = 0; |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | extern int split(); | 25 | extern int split(char *, char *[], int, char *); |
| 26 | extern void regprint(); | 26 | extern void regprint(regex_t *, FILE *); |
| 27 | 27 | ||
| 28 | /* | 28 | /* |
| 29 | - main - do the simple case, hand off to regress() for regression | 29 | - main - do the simple case, hand off to regress() for regression |
| 30 | */ | 30 | */ |
| 31 | int | 31 | int |
| 32 | main(argc, argv) | 32 | main(int argc, char *argv[]) |
| 33 | int argc; | 33 | |
| 34 | char *argv[]; | ||
| 35 | { | 34 | { |
| 36 | regex_t re; | 35 | regex_t re; |
| 37 | # define NS 10 | 36 | # define NS 10 |
| @@ -431,8 +430,9 @@ char *should; | |||
| 431 | (sub.rm_so != -1 && sub.rm_eo == -1) || | 430 | (sub.rm_so != -1 && sub.rm_eo == -1) || |
| 432 | (sub.rm_so != -1 && sub.rm_so < 0) || | 431 | (sub.rm_so != -1 && sub.rm_so < 0) || |
| 433 | (sub.rm_eo != -1 && sub.rm_eo < 0) ) { | 432 | (sub.rm_eo != -1 && sub.rm_eo < 0) ) { |
| 434 | sprintf(grump, "start %ld end %ld", (long)sub.rm_so, | 433 | snprintf(grump, sizeof grump, |
| 435 | (long)sub.rm_eo); | 434 | "start %ld end %ld", (long)sub.rm_so, |
| 435 | (long)sub.rm_eo); | ||
| 436 | return(grump); | 436 | return(grump); |
| 437 | } | 437 | } |
| 438 | 438 | ||
| @@ -444,8 +444,9 @@ char *should; | |||
| 444 | 444 | ||
| 445 | /* check for in range */ | 445 | /* check for in range */ |
| 446 | if (sub.rm_eo > strlen(str)) { | 446 | if (sub.rm_eo > strlen(str)) { |
| 447 | sprintf(grump, "start %ld end %ld, past end of string", | 447 | snprintf(grump, sizeof grump, |
| 448 | (long)sub.rm_so, (long)sub.rm_eo); | 448 | "start %ld end %ld, past end of string", |
| 449 | (long)sub.rm_so, (long)sub.rm_eo); | ||
| 449 | return(grump); | 450 | return(grump); |
| 450 | } | 451 | } |
| 451 | 452 | ||
| @@ -455,13 +456,13 @@ char *should; | |||
| 455 | 456 | ||
| 456 | /* check for not supposed to match */ | 457 | /* check for not supposed to match */ |
| 457 | if (should == NULL) { | 458 | if (should == NULL) { |
| 458 | sprintf(grump, "matched `%.*s'", len, p); | 459 | snprintf(grump, sizeof grump, "matched `%.*s'", len, p); |
| 459 | return(grump); | 460 | return(grump); |
| 460 | } | 461 | } |
| 461 | 462 | ||
| 462 | /* check for wrong match */ | 463 | /* check for wrong match */ |
| 463 | if (len != shlen || strncmp(p, should, (size_t)shlen) != 0) { | 464 | if (len != shlen || strncmp(p, should, (size_t)shlen) != 0) { |
| 464 | sprintf(grump, "matched `%.*s' instead", len, p); | 465 | snprintf(grump, sizeof grump, "matched `%.*s' instead", len, p); |
| 465 | return(grump); | 466 | return(grump); |
| 466 | } | 467 | } |
| 467 | if (shlen > 0) | 468 | if (shlen > 0) |
| @@ -474,7 +475,7 @@ char *should; | |||
| 474 | if (shlen == 0) | 475 | if (shlen == 0) |
| 475 | shlen = 1; /* force check for end-of-string */ | 476 | shlen = 1; /* force check for end-of-string */ |
| 476 | if (strncmp(p, at, shlen) != 0) { | 477 | if (strncmp(p, at, shlen) != 0) { |
| 477 | sprintf(grump, "matched null at `%.20s'", p); | 478 | snprintf(grump, sizeof grump, "matched null at `%.20s'", p); |
| 478 | return(grump); | 479 | return(grump); |
| 479 | } | 480 | } |
| 480 | return(NULL); | 481 | return(NULL); |
| @@ -507,7 +508,7 @@ char *name; | |||
| 507 | static char efbuf[100]; | 508 | static char efbuf[100]; |
| 508 | regex_t re; | 509 | regex_t re; |
| 509 | 510 | ||
| 510 | sprintf(efbuf, "REG_%s", name); | 511 | snprintf(efbuf, sizeof efbuf, "REG_%s", name); |
| 511 | assert(strlen(efbuf) < sizeof(efbuf)); | 512 | assert(strlen(efbuf) < sizeof(efbuf)); |
| 512 | re.re_endp = efbuf; | 513 | re.re_endp = efbuf; |
| 513 | (void) regerror(REG_ATOI, &re, efbuf, sizeof(efbuf)); | 514 | (void) regerror(REG_ATOI, &re, efbuf, sizeof(efbuf)); |
diff --git a/src/regress/lib/libc/regex/split.c b/src/regress/lib/libc/regex/split.c index 52cb6c681e..1e17a55b89 100644 --- a/src/regress/lib/libc/regex/split.c +++ b/src/regress/lib/libc/regex/split.c | |||
| @@ -1,19 +1,17 @@ | |||
| 1 | /* $OpenBSD: split.c,v 1.2 2001/01/29 02:05:44 niklas Exp $ */ | 1 | /* $OpenBSD: split.c,v 1.3 2003/07/31 21:48:03 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> |
| 5 | #include <string.h> | 5 | #include <string.h> |
| 6 | 6 | ||
| 7 | int split(char *string, char *fields[], int nfields, char *sep); | ||
| 8 | |||
| 7 | /* | 9 | /* |
| 8 | - split - divide a string into fields, like awk split() | 10 | - split - divide a string into fields, like awk split() |
| 9 | = int split(char *string, char *fields[], int nfields, char *sep); | 11 | = int split(char *string, char *fields[], int nfields, char *sep); |
| 10 | */ | 12 | */ |
| 11 | int /* number of fields, including overflow */ | 13 | int /* number of fields, including overflow */ |
| 12 | split(string, fields, nfields, sep) | 14 | split(char *string, char *fields[], int nfields, char *sep) |
| 13 | char *string; | ||
| 14 | char *fields[]; /* list is not NULL-terminated */ | ||
| 15 | int nfields; /* number of entries available in fields[] */ | ||
| 16 | char *sep; /* "" white, "c" single char, "ab" [ab]+ */ | ||
| 17 | { | 15 | { |
| 18 | register char *p = string; | 16 | register char *p = string; |
| 19 | register char c; /* latest character */ | 17 | register char c; /* latest character */ |
diff --git a/src/regress/lib/libc/setjmp/jmptest.c b/src/regress/lib/libc/setjmp/jmptest.c index de6e70d9f6..86b0e6ae93 100644 --- a/src/regress/lib/libc/setjmp/jmptest.c +++ b/src/regress/lib/libc/setjmp/jmptest.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: jmptest.c,v 1.5 2001/11/11 23:26:35 deraadt Exp $ */ | 1 | /* $OpenBSD: jmptest.c,v 1.6 2003/07/31 21:48:03 deraadt Exp $ */ |
| 2 | /* $NetBSD: jmptest.c,v 1.2 1995/01/01 20:55:35 jtc Exp $ */ | 2 | /* $NetBSD: jmptest.c,v 1.2 1995/01/01 20:55:35 jtc Exp $ */ |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| @@ -64,9 +64,8 @@ | |||
| 64 | 64 | ||
| 65 | int expectsignal; | 65 | int expectsignal; |
| 66 | 66 | ||
| 67 | void | 67 | static void |
| 68 | aborthandler(signo) | 68 | aborthandler(int signo) |
| 69 | int signo; | ||
| 70 | { | 69 | { |
| 71 | 70 | ||
| 72 | if (expectsignal) | 71 | if (expectsignal) |
| @@ -78,9 +77,7 @@ aborthandler(signo) | |||
| 78 | } | 77 | } |
| 79 | 78 | ||
| 80 | int | 79 | int |
| 81 | main(argc, argv) | 80 | main(int argc, char *argv[]) |
| 82 | int argc; | ||
| 83 | char *argv[]; | ||
| 84 | { | 81 | { |
| 85 | struct sigaction sa; | 82 | struct sigaction sa; |
| 86 | BUF jb; | 83 | BUF jb; |
diff --git a/src/regress/lib/libc/sigreturn/sigret.c b/src/regress/lib/libc/sigreturn/sigret.c index 416869007a..72945fa503 100644 --- a/src/regress/lib/libc/sigreturn/sigret.c +++ b/src/regress/lib/libc/sigreturn/sigret.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * $OpenBSD: sigret.c,v 1.4 2002/04/30 01:59:47 deraadt Exp $ | 2 | * $OpenBSD: sigret.c,v 1.5 2003/07/31 21:48:04 deraadt Exp $ |
| 3 | * | 3 | * |
| 4 | * Public Domain | 4 | * Public Domain |
| 5 | * | 5 | * |
| @@ -64,13 +64,13 @@ usage(const char * err, ...) | |||
| 64 | exit(1); | 64 | exit(1); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | void | 67 | static void |
| 68 | indirect_return(struct sigcontext * scp) | 68 | indirect_return(struct sigcontext * scp) |
| 69 | { | 69 | { |
| 70 | sigreturn(scp); | 70 | sigreturn(scp); |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | void | 73 | static void |
| 74 | sig_handler(int sig, siginfo_t *blah, void *x) | 74 | sig_handler(int sig, siginfo_t *blah, void *x) |
| 75 | { | 75 | { |
| 76 | struct sigcontext * scp = x; | 76 | struct sigcontext * scp = x; |
| @@ -90,7 +90,7 @@ sig_handler(int sig, siginfo_t *blah, void *x) | |||
| 90 | } | 90 | } |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | void | 93 | static void |
| 94 | test2(char *fmt) | 94 | test2(char *fmt) |
| 95 | { | 95 | { |
| 96 | char *ofmt = fmt; | 96 | char *ofmt = fmt; |
