Feedback on l1sap-parts

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

Andreas Eversberg andreas at eversberg.eu
Thu Jan 16 15:38:17 UTC 2014


Holger Hans Peter Freyther wrote:

dear holger,

thanks for advices.
> E.g. in here
> #define L1SAP_IS_LINK_SACCH(link_id) ((link_id & 0xC0) == 0x40)
>   
i could change it (and other defines) to something like

#define GSM_LINK_ID_SACCH 0x40
#define GSM_LINK_ID_MASK 0xc0
#define L1SAP_IS_LINK_SACCH(link_id) ((link_id & GSM_LINK_ID_MASK) ==
GSM_LINK_ID_SACCH)

is that what you mean by avoiding magic numbers?

best regards,

andreas






More information about the OpenBSC mailing list