libosmocore[master]: utils: add osmo_is_hexstr(), add unit test

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sun Oct 8 19:51:08 UTC 2017


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/4159/1/src/utils.c
File src/utils.c:

Line 395: 	const unsigned char *pos = (const unsigned char *)str;
> That looks weird. Why not just use "const unsigned char *str" in parameters
I want the function to work on normal char strings. But doing pos++ on plain 'char *' causes compiler warnings, as the comment explains. I don't get these warnings on every platform, but it did show in the gerrit checks for https://gerrit.osmocom.org/4144 . If I made str a const unsigned char* param, I would have to cast for each and every caller trying to feed a plain char* to it. It has to be exactly like this, AFAICT, unfortunately.


-- 
To view, visit https://gerrit.osmocom.org/4159
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idf75946eb0a84e145adad13fc7c78bb7a267aa0a
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list