From owner-svn-src-head@FreeBSD.ORG Thu Oct 1 18:20:31 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 0AB541065792; Thu, 1 Oct 2009 18:20:31 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 952C88FC1E; Thu, 1 Oct 2009 18:20:30 +0000 (UTC) Received: from c122-107-125-150.carlnfd1.nsw.optusnet.com.au (c122-107-125-150.carlnfd1.nsw.optusnet.com.au [122.107.125.150]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n91IKMCN004635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Oct 2009 04:20:23 +1000 Date: Fri, 2 Oct 2009 04:20:22 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Coleman Kane In-Reply-To: <1254418346.4255.31.camel@localhost> Message-ID: <20091002040903.U21917@delplex.bde.org> References: <200910010243.n912hpSM034846@svn.freebsd.org> <86eipno12p.fsf@ds4.des.no> <20091002002534.D21507@delplex.bde.org> <1254418346.4255.31.camel@localhost> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-971013447-1254421222=:21917" Cc: svn-src-head@FreeBSD.org, Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r197654 - head/sys/dev/if_ndis 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: Thu, 01 Oct 2009 18:20:31 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-971013447-1254421222=:21917 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 1 Oct 2009, Coleman Kane wrote: > On Fri, 2009-10-02 at 00:36 +1000, Bruce Evans wrote: >> On Thu, 1 Oct 2009, [utf-8] Dag-Erling Sm=C3=B8rgrav wrote: >> >>> Coleman Kane writes: >>>> -=09=09if (sc->ndis_80211 && vap) >>>> +=09=09if ((sc->ndis_80211 !=3D NULL) && (vap !=3D NULL)) >>> >>> sc->ndis_80211 is an int. NULL is a pointer. >> >> Also, the number of style bugs was doubled on (almost?) every changed li= ne >> by adding 2 sets of unnecessary parentheses. >> >> Bruce > > Re-read style(9) more closely. Do I need to read it at all :-). > Yes... the extra parentheses are superfluous, and should therefore be > removed. However, the current rev, which looks like this: > > if ((sc->ndis_80211 !=3D 0) && (vap !=3D NULL)) > > doesn't help the author shoot themselves in the foot as violating the > "explicitly compare values to zero" rule did in the earlier revision. Actually I needed to count the style bugs more carefully -- 2 implicit comparisons with 0 or NULL (unless the first one is really boolean), but I only counted 1, while I counted 2 for the extra parentheses. > I'll heed the request of the second-to-last paragraph of style(9) on > this particular change, not churning the SVN repo further, and make a > mental note for later. Thanks. I forgot about that paragraph being there. I think churning repos doesn't matter much now if it ever did, but churning sources makes their history hard to understand. Bruce --0-971013447-1254421222=:21917--