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 Mon, Nov 02, 2015 at 03:06:29PM +0100, Neels Hofmeyr wrote:
> On Mon, Nov 02, 2015 at 11:33:50AM +0100, Holger Freyther wrote:
> > > static int gsup_client_read_cb(struct ipa_client_conn *link, struct msgb *msg)
> > > {
> > >
> > > - OSMO_ASSERT(gsupc->read_cb != NULL);
> > > - gsupc->read_cb(gsupc, msg);
> > > + if (he->proto == IPAC_PROTO_EXT_GSUP) {
> > > + OSMO_ASSERT(gsupc->read_cb != NULL);
> > > + gsupc->read_cb(gsupc, msg);
> > > + /* expecting read_cb() to free msg */
> > > + }
> > > + else
> > > + if (he->proto == IPAC_PROTO_EXT_OAP) {
> > > + return gsup_client_oap_handle(gsupc, msg);
> > > + /* gsup_client_oap_handle frees msg */
> > > + }
> > > + else
> > > + goto invalid;
> >
> > the coding style would not have else and if on two different lines. I will fix this myself
> > right now.
>
> Yes, indeed. I'm doing that on purpose... the logical idea is that the if
> conditions all start on the same column.
Now that I'm actually looking at the commit, let's name it:
I wrote:
if (a) {
frizziply();
}
else
if (b) {
frobnicate();
}
else
goto invalid;
and you committed
if (a) {
frizziply();
} else if (b) {
frobnicate();
} else
goto invalid;
I personally find it mildly ugly, but let's avoid the discussion.
To reiterate, I'd like to know whether gtphub should/really must ;) be
changed to the latter style.
~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/20151102/eb007b8b/attachment.bin>