From owner-svn-src-all@FreeBSD.ORG Sun May 11 03:17:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43A953BC; Sun, 11 May 2014 03:17:58 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id F20762BE0; Sun, 11 May 2014 03:17:57 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id EE0DD780D1D; Sun, 11 May 2014 13:17:53 +1000 (EST) Date: Sun, 11 May 2014 13:17:46 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r265845 - head/lib/libc/gen In-Reply-To: <201405101859.s4AIxAor079383@svn.freebsd.org> Message-ID: <20140511125426.P989@besplex.bde.org> References: <201405101859.s4AIxAor079383@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=eojmkOZX c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=vaJPxeoEahUA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=QpLNrAYZXdHN2xdo1PsA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Sun, 11 May 2014 03:17:58 -0000 On Sat, 10 May 2014, Konstantin Belousov wrote: > Log: > Style. Thanks, but this adds a style bug of the same type as one that it removes. > Modified: head/lib/libc/gen/sem_new.c > ============================================================================== > --- head/lib/libc/gen/sem_new.c Sat May 10 17:42:21 2014 (r265844) > +++ head/lib/libc/gen/sem_new.c Sat May 10 18:59:09 2014 (r265845) > @@ -294,13 +294,13 @@ _sem_unlink(const char *name) > return -1; > } > name++; > - Was an extra blank line. > strcpy(path, SEM_PREFIX); > if (strlcat(path, name, sizeof(path)) >= sizeof(path)) { > errno = ENAMETOOLONG; > return (-1); > } > - return unlink(path); > + Now an extra blank line. > + return (unlink(path)); > } > > int Statements are not separated by blank lines in KNF except in exceptional circumstances. In strict KNF, even blocks starting with a block comment are not separated by blank lines. This is too much for me, so my rule is to always use blank lines for sections beginning with a comment and rarely use them otherwise (maybe every 20 lines). This file has several other style bugs. indent(1) fixes the following formatting ones: - trailing whitespace - missing indentation in struct declaration - doubled spaces after &ma - several more instances of an extra blank line - missing spaces around binary operators (about 10 instances) - non-cuddled else - non-KNF continuation indentation - missing space after 'while' indent(1) doesn't understand its own -lp option and fails to fix long lines and otherwise miswrapped lines, except for the continuation indentation. Variant formatting of extra blank lines (to remove the one that you removed and add the one that you added) would be impossibly difficult for indent(1) to fix or preserve. Non-formatting style bugs are harder to fix. Altogether, there are style bugs on about 10% of lines. Below average ugliness. Bruce