Change in libosmocore[master]: Introduce fields related to DTAP DLCI

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/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Wed Nov 27 12:39:21 UTC 2019


fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16259 )

Change subject: Introduce fields related to DTAP DLCI
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/16259/1/include/osmocom/gsm/protocol/gsm_08_08.h 
File include/osmocom/gsm/protocol/gsm_08_08.h:

https://gerrit.osmocom.org/c/libosmocore/+/16259/1/include/osmocom/gsm/protocol/gsm_08_08.h@46 
PS1, Line 46: union
Oh, be careful! Unions with bit-fields is a dangerous mix. I had a very bad experience with such constructions. At least on GCC it was not working as expected: all bit-fields actually share the same memory with the same offset (i.e. changing dlci_cc to 0x02 would also set both dlci_spare and dlci_sapi to 0x02). For more details, see (in Russian, but Google Translate can do the magic) https://www.stableit.ru/2016/02/union-bit-fields-c.html.

Feel free to add a unit test setting different values to the bit-fields, and check their values.



-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16259
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iec448af02d28e6c5c573e68a0b4a86067ec7e561
Gerrit-Change-Number: 16259
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Comment-Date: Wed, 27 Nov 2019 12:39:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191127/d188d47c/attachment.htm>


More information about the gerrit-log mailing list