From owner-svn-src-head@FreeBSD.ORG Thu Oct 1 18:46:38 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 32C92106568B for ; Thu, 1 Oct 2009 18:46:38 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out1.fuse.net (mail-out1.fuse.net [216.68.8.175]) by mx1.freebsd.org (Postfix) with ESMTP id E2B538FC0C for ; Thu, 1 Oct 2009 18:46:37 +0000 (UTC) X-CNFS-Analysis: v=1.1 cv=Jf3tspjE8XI4z6saXnuFbjgHz4WKruKDsdWNlYDB8z0= c=1 sm=0 a=YYkPiygOjqcA:10 a=6I5d2MoRAAAA:8 a=5NRtI-kUalALLSyT6tIA:9 a=_HdLcGZMIcqpDuZqAVcA:7 a=qn7lfz4Ks5yHYWggAD9Lj9F6cnIA:4 a=SV7veod9ZcQA:10 a=h4xQxGY_LDVKyn9w1MAA:9 a=agx7ydx-tRjAyvU9kHkxu3eBtUwA:4 a=LkYvsgB9u1MH7Ao0BLhsLg==:117 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: ecout1 smtp.mail=cokane@FreeBSD.org; spf=softfail Received-SPF: softfail (ecout1: transitional domain FreeBSD.org does not designate 74.215.227.9 as permitted sender) Received: from [74.215.227.9] ([74.215.227.9:50818] helo=mail.colemankane.org) by ecout1 (envelope-from ) (ecelerity 2.2.2.43 r()) with ESMTP id EC/5E-02412-B09F4CA4; Thu, 01 Oct 2009 14:46:36 -0400 Received: from [172.20.0.76] (rrcs-96-11-231-210.central.biz.rr.com [96.11.231.210]) by mail.colemankane.org (Postfix) with ESMTPSA id 4F1DF1143F; Thu, 1 Oct 2009 15:51:33 -0400 (EDT) From: Coleman Kane To: Bruce Evans In-Reply-To: <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> <20091002040903.U21917@delplex.bde.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-T6DbjhiwI1lJTleeaEDw" Organization: FreeBSD Project Date: Thu, 01 Oct 2009 14:43:45 -0400 Message-Id: <1254422625.4255.46.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Cc: svn-src-head@FreeBSD.org, Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org 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:46:38 -0000 --=-T6DbjhiwI1lJTleeaEDw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2009-10-02 at 04:20 +1000, Bruce Evans wrote: > On Thu, 1 Oct 2009, Coleman Kane wrote: >=20 > > 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: > >>>> - if (sc->ndis_80211 && vap) > >>>> + if ((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 = line > >> by adding 2 sets of unnecessary parentheses. > >> > >> Bruce > > > > Re-read style(9) more closely. >=20 > Do I need to read it at all :-). I meant that in the past-tense first-person manner, sorry, not trying to tell anyone what to do. ;) Should have written "I re-read style(9)...". >=20 > > 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. >=20 > 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 think you're right about the ndis_80211. I got thrown off by the first usage of it in the file which reads: sc->ndis_80211++; But it looks like 1) It is tested elsewhere as a boolean, and 2) That statement really means sc->ndis_80211 =3D 1 (or =3D TRUE). >=20 > > 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. >=20 > 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. >=20 > Bruce --=20 Coleman Kane --=-T6DbjhiwI1lJTleeaEDw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEABECAAYFAkrE+GEACgkQcMSxQcXat5ccBACeNFaorAGbJhBRJdEDb8gOKH24 7G4AmwXTnh1TJPOF7OjBXlWxnIH0BVXj =piNZ -----END PGP SIGNATURE----- --=-T6DbjhiwI1lJTleeaEDw--