From owner-freebsd-hackers Tue Mar 5 16:44: 6 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 1623837B400; Tue, 5 Mar 2002 16:44:03 -0800 (PST) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.6/8.11.1) id g260hwq38554; Tue, 5 Mar 2002 16:43:58 -0800 (PST) (envelope-from obrien) Date: Tue, 5 Mar 2002 16:40:54 -0800 From: "David O'Brien" To: Giorgos Keramidas Cc: hackers@freebsd.org Subject: Re: RFC: style(9) isn't explicit about booleans for testing. Message-ID: <20020305164054.B38095@dragon.nuxi.com> Reply-To: obrien@freebsd.org References: <20020305201350.GC4820@hades.hell.gr> <20020305155850.A38095@dragon.nuxi.com> <20020306000806.GC6839@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020306000806.GC6839@hades.hell.gr>; from keramida@freebsd.org on Wed, Mar 06, 2002 at 02:08:07AM +0200 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Mar 06, 2002 at 02:08:07AM +0200, Giorgos Keramidas wrote: > On 2002-03-05 15:58, David O'Brien wrote: > > On Tue, Mar 05, 2002 at 10:13:50PM +0200, Giorgos Keramidas wrote: > > > > -Don't use '!' for tests unless it's a boolean, e.g. use > > > > +For tests, always compare the value to the appropriate 0 instead of > > > > +checking it directly, unless the value is a boolean. > ... > > > > Please show examples from /sys that back up this change. To state this > > explicitly, I think a significant number of /sys files should be > > following it. > > Actually I was asking for comments, but anyways. I was giving one. :-) style(9) documents the practices of /sys. Thus we should not arbitaryly add rules w/o them being backed up in code. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message