summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2011-12-07 16:12:54 +0000
committertheraven <theraven@FreeBSD.org>2011-12-07 16:12:54 +0000
commite002a9853cd8f392054baf549f1d61fc1ad8c0cd (patch)
treefc53727e347bba539bd152554cbeb4f8cafff7b8 /lib
parentded93cd9e74a8cb2766f3a3f2ecaab59747c59e4 (diff)
downloadFreeBSD-src-e002a9853cd8f392054baf549f1d61fc1ad8c0cd.zip
FreeBSD-src-e002a9853cd8f392054baf549f1d61fc1ad8c0cd.tar.gz
style(9) cleanups.
Approved by: brooks (mentor)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/quick_exit.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/libc/stdlib/quick_exit.c b/lib/libc/stdlib/quick_exit.c
index 11e22da..33f9348 100644
--- a/lib/libc/stdlib/quick_exit.c
+++ b/lib/libc/stdlib/quick_exit.c
@@ -39,9 +39,6 @@ struct quick_exit_handler {
void (*cleanup)(void);
};
-__attribute((weak))
-void _ZSt9terminatev(void);
-
/**
* Lock protecting the handlers list.
*/
@@ -56,26 +53,26 @@ at_quick_exit(void (*func)(void))
{
struct quick_exit_handler *h = malloc(sizeof(struct quick_exit_handler));
- if (0 == h) {
+ if (NULL == h)
return 1;
- }
h->cleanup = func;
pthread_mutex_lock(&atexit_mutex);
h->next = handlers;
handlers = h;
pthread_mutex_unlock(&atexit_mutex);
- return 0;
+ return (0);
}
-void quick_exit(int status)
+void
+quick_exit(int status)
{
+ struct quick_exit_handler *h;
+
/*
* XXX: The C++ spec requires us to call std::terminate if there is an
* exception here.
*/
- for (struct quick_exit_handler *h = handlers ; NULL != h ; h = h->next)
- {
+ for (h = handlers; NULL != h; h = h->next)
h->cleanup();
- }
_Exit(status);
}
OpenPOWER on IntegriCloud