diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/atexit.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/libc/stdlib/atexit.c b/src/lib/libc/stdlib/atexit.c index 98564d0dd3..4fd2c57318 100644 --- a/src/lib/libc/stdlib/atexit.c +++ b/src/lib/libc/stdlib/atexit.c | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | #if defined(LIBC_SCCS) && !defined(lint) | 31 | #if defined(LIBC_SCCS) && !defined(lint) |
| 32 | static char *rcsid = "$OpenBSD: atexit.c,v 1.7 2002/09/14 22:03:14 dhartmei Exp $"; | 32 | static char *rcsid = "$OpenBSD: atexit.c,v 1.8 2005/03/30 18:51:49 pat Exp $"; |
| 33 | #endif /* LIBC_SCCS and not lint */ | 33 | #endif /* LIBC_SCCS and not lint */ |
| 34 | 34 | ||
| 35 | #include <sys/types.h> | 35 | #include <sys/types.h> |
| @@ -59,11 +59,10 @@ struct atexit *__atexit; | |||
| 59 | * Register a function to be performed at exit. | 59 | * Register a function to be performed at exit. |
| 60 | */ | 60 | */ |
| 61 | int | 61 | int |
| 62 | atexit(fn) | 62 | atexit(void (*fn)(void)) |
| 63 | void (*fn)(); | ||
| 64 | { | 63 | { |
| 65 | register struct atexit *p = __atexit; | 64 | struct atexit *p = __atexit; |
| 66 | register int pgsize = getpagesize(); | 65 | int pgsize = getpagesize(); |
| 67 | 66 | ||
| 68 | if (pgsize < sizeof(*p)) | 67 | if (pgsize < sizeof(*p)) |
| 69 | return (-1); | 68 | return (-1); |
| @@ -102,11 +101,10 @@ atexit(fn) | |||
| 102 | * Register the cleanup function | 101 | * Register the cleanup function |
| 103 | */ | 102 | */ |
| 104 | void | 103 | void |
| 105 | __atexit_register_cleanup(fn) | 104 | __atexit_register_cleanup(void (*fn)(void)) |
| 106 | void (*fn)(); | ||
| 107 | { | 105 | { |
| 108 | register struct atexit *p = __atexit; | 106 | struct atexit *p = __atexit; |
| 109 | register int pgsize = getpagesize(); | 107 | int pgsize = getpagesize(); |
| 110 | 108 | ||
| 111 | if (pgsize < sizeof(*p)) | 109 | if (pgsize < sizeof(*p)) |
| 112 | return; | 110 | return; |
