[PATCH] Improve hex parser

Max.Suraev at fairwaves.ru
Mon Jan 14 18:22:21 CET 2013


Hello.

Current implementation of osmo_hexparse have couple of limitations (which are
undocumented btw):

* it refuses to parse odd-length numbers (e. g. 7abdf)
* it fails while parsing 0x prefix (e. g. 0xdead)

Both could be worked around by upper-layer code of course but since both cases above
are perfectly valid hexadecimal numbers I think they should be handled by
osmo_hexparse internally without complicating life of library users.

Attached patch does just that. Please review and merge if it feels OK.

-- 
best regards,
Max, http://fairwaves.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Improve-hex-parser-robustness.patch
Type: text/x-patch
Size: 1441 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/baseband-devel/attachments/20130114/fb2a0f66/attachment.bin>


More information about the baseband-devel mailing list