Change in osmo-ttcn3-hacks[master]: msc: Fix random error of TC_cl3_rnd_payload

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

daniel gerrit-no-reply at lists.osmocom.org
Thu Jul 26 10:43:02 UTC 2018


daniel has posted comments on this change. ( https://gerrit.osmocom.org/10166 )

Change subject: msc: Fix random error of TC_cl3_rnd_payload
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/10166/1/msc/MSC_Tests.ttcn
File msc/MSC_Tests.ttcn:

https://gerrit.osmocom.org/#/c/10166/1/msc/MSC_Tests.ttcn@1159
PS1, Line 1159: 	// other fields beside l3info payload. So payl can only be 240 bytes
> Oh returning <1 is not nice indeed. […]
I think this is standard as far as random behaviour is concerned. Python random.random() also ranges from 0.0 to <1.0 and rand() in c would typically be used as rand() % n+1 to give a range from 0 to n.
Nevertheless I added a short comment explaining the off-by-1.



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7be33e261a11f03a80a6b770b6acf0a4be49b85b
Gerrit-Change-Number: 10166
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Comment-Date: Thu, 26 Jul 2018 10:43:02 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180726/eceefad7/attachment.htm>


More information about the gerrit-log mailing list