[PATCH] Implement TP-VPF-ENHANCED

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/.

Holger Freyther zecke at selfish.org
Wed Nov 18 08:43:48 UTC 2009


On Tuesday 17 November 2009 20:02:13 Steffen 'stefreak' Neubauer wrote:
> On Tue, 17 Nov 2009 19:44:18 +0100
> 
> Holger Freyther <zecke at selfish.org> wrote:
> > I think it is one of the cases where a function call makes more sense?
> 
> Hmm, really? All this stuff is only needed (as far as i know, of
> course ;)) for the validity-period decoding - nowhere else. Would you
> really put all those small VPF-implementations into their own
> functions? At the moment only the service centre time stamp decoding
> has it's own function because it's needed elsewhere.
> Isn't it clear enough with 'goto'?

Yes, I would put all these into static methods... the compiler will inline 
them for you. The problem with this amount of gotos is it is really hard to 
understand which ways you are jumping. E.g. within "enhanced" you will do a 
backward jump. The problem with that it is very hard to make sure that your 
jumping will end... if/else if and function calls are much easier to read.

holger




More information about the OpenBSC mailing list