Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Oct 2009 13:32:25 -0400
From:      Coleman Kane <cokane@FreeBSD.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        svn-src-head@freebsd.org, Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= <des@des.no>, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r197654 - head/sys/dev/if_ndis
Message-ID:  <1254418346.4255.31.camel@localhost>
In-Reply-To: <20091002002534.D21507@delplex.bde.org>
References:  <200910010243.n912hpSM034846@svn.freebsd.org> <86eipno12p.fsf@ds4.des.no>  <20091002002534.D21507@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-Eb9wi9n/DFmYjo6p2yUi
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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:
>=20
> > Coleman Kane <cokane@FreeBSD.org> 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.
>=20
> Also, the number of style bugs was doubled on (almost?) every changed lin=
e
> by adding 2 sets of unnecessary parentheses.
>=20
> Bruce

Re-read style(9) more closely.

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.

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
Coleman Kane

--=-Eb9wi9n/DFmYjo6p2yUi
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)

iEYEABECAAYFAkrE56kACgkQcMSxQcXat5cXTACfV1aTRY0HckK3TnAhNl4FHqtJ
8LAAnRhOkgNdnlOCO5Nl22wiuqCNWuC5
=wUWs
-----END PGP SIGNATURE-----

--=-Eb9wi9n/DFmYjo6p2yUi--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1254418346.4255.31.camel>