This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.
Neels Hofmeyr nhofmeyr at sysmocom.deOn Wed, Apr 06, 2016 at 10:05:46AM +0200, Harald Welte wrote:
> Hi Matthew,
>
> thanks for your patches and your interest in contributing.
>
> On Tue, Apr 05, 2016 at 11:18:51PM +0200, Matthew Daiter wrote:
> > - if (!msc->msc_con->is_authenticated)
> > - continue;
> > - if (!is_emerg && msc->type != MSC_CON_TYPE_NORMAL)
> > - continue;
> > - if (is_emerg && !msc->allow_emerg)
> > + if ((!msc->msc_con->is_authenticated) ||
> > + (!is_emerg && msc->type != MSC_CON_TYPE_NORMAL) ||
> > + (is_emerg && !msc->allow_emerg))
> > continue;
>
> I thinkt it's a matter of taste. To me, the existing code actually is
> more obvious and easier to read
I also prefer the separate if()s for instant clarity.
> > - if (memcmp(&lai, &lu->lai, sizeof(lai)) != 0) {
> > + if (memcmp(&lai, &lu->lai, sizeof(lai))) {
>
> again here, it is a question of taste. The '!= 0' proabably serves as
> a reminder at the strange behavior of memcmp() returning 0 in case of
> success.
I always do the != 0 with strcmp :)
Though I wouldn't bother to commit a patch to change it, I agree with != 0.
Thanks for joining us, Matthew! Do stay around and help us out :)
~Neels
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20160406/ad8d4fb7/attachment.bin>