const question, take II

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.de
Wed Mar 16 22:22:11 UTC 2016


On Wed, Mar 16, 2016 at 11:28:30AM +0100, Harald Welte wrote:
> Why does gsm48_hdr_pdisc() not take a 'const struct gsm48_hdr *'
> argument in the first place?  I don't think it modifies the contents of
> the structure...

Yes, Holger has applied the patch with exactly that change.

Yet this has me confused. A while back I concluded that C doesn't allow
passing non-const instances to functions that expect a const arg. That was
discussed on this list in January:

http://lists.osmocom.org/pipermail/openbsc/2016-January/001051.html
http://lists.osmocom.org/pipermail/openbsc/2016-January/001055.html

How is this different from the conclusion that Jacob confirmed two months
ago? Is it int (primitives) vs. struct??

Thanks!

~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/20160316/38e295b2/attachment.bin>


More information about the OpenBSC mailing list