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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19586 ) Change subject: comment: Osmocom_Types.ttcn: clarify f_rnd_int() return val ...................................................................... comment: Osmocom_Types.ttcn: clarify f_rnd_int() return val Change-Id: I0841b037d39fcadb75e1c13cf97d22917b68e2aa --- M library/Osmocom_Types.ttcn 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index e55f1d6..994a0cc 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -49,7 +49,8 @@ uint15_t arfcn } with { variant "" }; - /* return random integer between 0 and max */ + /* return random integer 0 <= ret < max. According to ETSI ES 201 873 C.6.1, rnd() returns *less* than 1, so + * the returned int will always be ret < max, or ret <= (max-1). */ function f_rnd_int(integer max) return integer { return float2int(rnd()*int2float(max)); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19586 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0841b037d39fcadb75e1c13cf97d22917b68e2aa Gerrit-Change-Number: 19586 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200813/fa6be502/attachment.htm>