[PATCH] adjust msgb api

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


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

More information about the baseband-devel mailing list