libosmocore[master]: gsm: make osmo_imsi_str_valid() NULL-safe

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:46:05 UTC 2017


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/#/c/4156/1/src/gsm/gsm23003.c
File src/gsm/gsm23003.c:

Line 36: 	for (len = 0; pos && *pos && len < max_digits; len++, pos++)
> I thought so far the idea was to "fail early". Why not check str == NULL an
a NULL str may still return true when min_digits == 0. Ah, this reminds me that the API doc below lacks documentation of this. Should be like in https://gerrit.osmocom.org/4159


https://gerrit.osmocom.org/#/c/4156/1/tests/gsm23003/gsm23003_test.ok
File tests/gsm23003/gsm23003_test.ok:

Line 23: ----- test_valid_msisdn
(interesting, gerrit highlights the wrong line, probably an '\r' getting it mixed up)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I111fbf29228929f2cd6ffa06bcb1f69da223224e
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