From owner-svn-src-head@FreeBSD.ORG Wed Dec 7 16:12:54 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9742C1065675; Wed, 7 Dec 2011 16:12:54 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 874BF8FC0C; Wed, 7 Dec 2011 16:12:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pB7GCs6E046454; Wed, 7 Dec 2011 16:12:54 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pB7GCsjN046451; Wed, 7 Dec 2011 16:12:54 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201112071612.pB7GCsjN046451@svn.freebsd.org> From: David Chisnall Date: Wed, 7 Dec 2011 16:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228323 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2011 16:12:54 -0000 Author: theraven Date: Wed Dec 7 16:12:54 2011 New Revision: 228323 URL: http://svn.freebsd.org/changeset/base/228323 Log: style(9) cleanups. Approved by: brooks (mentor) Modified: head/lib/libc/stdlib/quick_exit.c Modified: head/lib/libc/stdlib/quick_exit.c ============================================================================== --- head/lib/libc/stdlib/quick_exit.c Wed Dec 7 15:25:48 2011 (r228322) +++ head/lib/libc/stdlib/quick_exit.c Wed Dec 7 16:12:54 2011 (r228323) @@ -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); }