Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2012 09:39:48 -0700
From:      Eitan Adler <eadler@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: svn commit: r236377 - head/sys/dev/vxge/vxgehal
Message-ID:  <CAF6rxgnTFVBNOewiPXNvHyt3YamWsa6YZDPFtM4-uumUD6Eqdg@mail.gmail.com>
In-Reply-To: <201206011024.49122.jhb@freebsd.org>
References:  <201206010423.q514NKtf083043@svn.freebsd.org> <20120601150242.V1226@besplex.bde.org> <CAF6rxg=MWEDPVND8rZKM72P-1Z9GG%2Bqn99qHhbCNRwmFG=3buA@mail.gmail.com> <201206011024.49122.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1 June 2012 07:24, John Baldwin <jhb@freebsd.org> wrote:
> This is why I personally loathe assignment side effects in boolean expres=
sions
> for control flow. =C2=A0I tend to write this sort of thing instead as:
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0channel->dtr_arr[dtr_index].dtr =3D dtrh;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0if (dtrh !=3D NULL) {

Same here. I was told to use the assignment is style(9) by multiple
people though. If it really is, I wish it would change.

--=20
Eitan Adler
Source & Ports committer
X11, Bugbusting teams



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