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 gerrit-no-reply at lists.osmocom.orgneels 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: (2 comments) 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@1419 PS1, Line 1419: int osmo_str_to_int64(int64_t *result, const char *str, int base, int64_t min_val, int64_t max_val) > We probably want to have: […] i specifically added the min max args because virtually all callers would do a range check with values other than INT64_MIN,INT64_MAX. It makes the code a lot shorter, with only one error clause. https://gerrit.osmocom.org/c/libosmocore/+/25345/1/src/utils.c@1430 PS1, Line 1430: if (val < INT64_MIN) { > This looks wrong. […] read 'man strtoll', it will return LLONG_MIN if the string value is smaller than the long long int range, and LLONG_MAX if the string value is larger than LLONG_MAX. That's the reason why i aim for the same here. it's a long long int, no idea if that can ever be larger than 64 bits??? i guess not in practice, but i'm not sure that that will never happen. No harm done either, right? -- 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:10:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No 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/6ef31b80/attachment.htm>