From owner-svn-src-all@FreeBSD.ORG Wed Dec 7 17:37:27 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41D261065672; Wed, 7 Dec 2011 17:37:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id BAB8C8FC12; Wed, 7 Dec 2011 17:37:26 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pB7HbOOl026013 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Dec 2011 04:37:25 +1100 Date: Thu, 8 Dec 2011 04:37:24 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Chisnall In-Reply-To: <201112071612.pB7GCsjN046451@svn.freebsd.org> Message-ID: <20111208043100.M2451@besplex.bde.org> References: <201112071612.pB7GCsjN046451@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228323 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2011 17:37:27 -0000 On Wed, 7 Dec 2011, David Chisnall wrote: > Log: > style(9) cleanups. Thanks, but many style bugs are still visible. > 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) > ... > @@ -56,26 +53,26 @@ at_quick_exit(void (*func)(void)) > { > struct quick_exit_handler *h = malloc(sizeof(struct quick_exit_handler)); This still has: - initialization in declaration - line too long - sizeof(typename) instead of sizeof(var). Maybe this is only a style bug for me, but for long typename's the verboseness given by sizeof(typename) helps implement the previous bug. > > - if (0 == h) { > + if (NULL == h) (h == NULL) would be normal. > return 1; This return is still missing parentheses. > - } > h->cleanup = func; > pthread_mutex_lock(&atexit_mutex); > h->next = handlers; > handlers = h; > pthread_mutex_unlock(&atexit_mutex); > - return 0; > + return (0); The one is fixed, so now the style for returns in this file is internally inconsistent. Bruce