[PATCH] adjust msgb api

Max.Suraev at fairwaves.ru
Mon Dec 16 17:11:58 CET 2013


Hi.

While looking at osmocom-bb compilation warnings I've noticed that there are plenty
of those cause by signed-unsigned comparison with msgb-related functions. Attached is
a trivial patch which fixes that by changing int -> uint16_t. For the sake of
completeness I've also changed other functions to explicitly use uint16_t - this is
used for length fields in "struct msgb" anyway.

Although technically it's API change I do not expect any sane code to break. If you
still think it's potentially insecure, this could be applied during next api version
bump alongside with gprs api change.

-- 
best regards,
Max, http://fairwaves.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-change-length-related-return-values-to-unsigned.patch
Type: text/x-patch
Size: 2737 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/baseband-devel/attachments/20131216/636f877f/attachment-0001.bin>


More information about the baseband-devel mailing list