svn commit: r197654 - head/sys/dev/if_ndis

Coleman Kane cokane at FreeBSD.org
Thu Oct 1 17:33:06 UTC 2009


On Fri, 2009-10-02 at 00:36 +1000, Bruce Evans wrote:
> On Thu, 1 Oct 2009, [utf-8] Dag-Erling Smørgrav wrote:
> 
> > Coleman Kane <cokane at FreeBSD.org> writes:
> >> -		if (sc->ndis_80211 && vap)
> >> +		if ((sc->ndis_80211 != NULL) && (vap != 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.

Yes... the extra parentheses are superfluous, and should therefore be
removed. However, the current rev, which looks like this:

  if ((sc->ndis_80211 != 0) && (vap != 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.

-- 
Coleman Kane
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20091001/5b7166cd/attachment.pgp


More information about the svn-src-all mailing list