Change in libosmocore[master]: revisit some calls of strtol(), stroul(), strtoull()

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 16:55:45 UTC 2021


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

Change subject: revisit some calls of strtol(), stroul(), strtoull()
......................................................................


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/25347/4/src/gsm/gsm23236.c 
File src/gsm/gsm23236.c:

https://gerrit.osmocom.org/c/libosmocore/+/25347/4/src/gsm/gsm23236.c@443 
PS4, Line 443: 	if (osmo_str_to_int(&val, str, base, 0, INT16_MAX))
> The point is that strtoll() is not trivial to use, […]
No problem, we can revisit this next time we have some weird bug due to weird behaviors or compiler warnings due to comparing or subtracting signed vs unsigned, etc.

In summary, if a variable is unsigned and it shouldn't contain a signed value, I favor working with the proper type.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0ebb06e751c28f7d1cdf328de29cd227a2449391
Gerrit-Change-Number: 25347
Gerrit-PatchSet: 4
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 16:55:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
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/d9e4d3b2/attachment.htm>


More information about the gerrit-log mailing list