Change in libosmocore[master]: utils: add osmo_str_to_int() and osmo_str_to_int64()

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

pespin gerrit-no-reply at lists.osmocom.org
Mon Sep 6 13:45:33 UTC 2021


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/25345 )

Change subject: utils: add osmo_str_to_int() and osmo_str_to_int64()
......................................................................


Patch Set 1: Code-Review+1

(1 comment)

Fine in general, though I'd add APIs for unsigned counterparts too, I already saw the patches using these APIs for expected unsigned values and code looks bit fishy imho.

https://gerrit.osmocom.org/c/libosmocore/+/25345/1/src/utils.c 
File src/utils.c:

https://gerrit.osmocom.org/c/libosmocore/+/25345/1/src/utils.c@1430 
PS1, Line 1430: 	if (val < INT64_MIN) {
> read 'man strtoll', it will return LLONG_MIN if the string value is smaller than the long long int r […]
Ah ok, indeed val is a long long int. In practice it shouldn't happen indeed, but fine with it.



-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/25345
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4dac826aab00bc1780a5258b6b55d34ce7d50c60
Gerrit-Change-Number: 25345
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 06 Sep 2021 13:45:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr at sysmocom.de>
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210906/d065414e/attachment.htm>


More information about the gerrit-log mailing list