From owner-svn-src-head@FreeBSD.ORG Wed Jul 1 15:05:12 2009 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 AA910106566C; Wed, 1 Jul 2009 15:05:12 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 678528FC19; Wed, 1 Jul 2009 15:05:12 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 7DA296D418; Wed, 1 Jul 2009 17:05:11 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 45346844C2; Wed, 1 Jul 2009 17:05:11 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bruce Evans References: <200906232316.n5NNG1iT094289@svn.freebsd.org> <20090625154007.H33864@delplex.bde.org> <4A43B727.7010204@delphij.net> <20090627033608.P35379@delplex.bde.org> <8663ed2265.fsf@ds4.des.no> <20090701214927.V39172@delplex.bde.org> Date: Wed, 01 Jul 2009 17:05:11 +0200 In-Reply-To: <20090701214927.V39172@delplex.bde.org> (Bruce Evans's message of "Wed, 1 Jul 2009 22:19:58 +1000 (EST)") Message-ID: <86iqica1g8.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Xin LI , svn-src-all@freebsd.org, src-committers@freebsd.org, d@delphij.net Subject: Re: svn commit: r194789 - head/usr.bin/usbhidctl 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, 01 Jul 2009 15:05:13 -0000 Bruce Evans writes: > "Dag-Erling Sm=C3=B8rgrav" writes: > > BTW, there are numerous style issues in sbin/reboot/reboot.c. > Really? According to knfom, it is 94.772% knf (up from 94.520% in > ~5.2 and 92.896% in Lite2). It is a small program so it is easy to > get right, but anything above 90% is a nice colour. (94.520% is due > to 7 lines fixed by indent(1) and 5 lines broken by indent(1)). I guess it depends on your definition of "numerous". The most obvious ones (since I was looking at usage()) were the missing void in the definition of usage() and the missing blank line at the top of the function. Other than that: #include directives are unordered, local variables in main() are declared in the wrong order, geteuid() is used as a predicate, and the required parentheses around the return value in get_pageins() are missing. I would also use fopen(3) and fprintf(3) instead of open(2) and write(2) to write nextboot.conf, and I would check that argc is 0 after the getopt(3) loop. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no