Mailing List Archive

[MythTV/mythtv] 181a1b: Negative random value where positive value is requ...
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: 181a1b861cd3acd2b646b6e035337a7017064be9
https://github.com/MythTV/mythtv/commit/181a1b861cd3acd2b646b6e035337a7017064be9
Author: Klaas de Waal <kdewaal@mythtv.org>
Date: 2021-01-09 (Sat, 09 Jan 2021)

Changed paths:
M mythtv/libs/libmythfreemheg/Programs.cpp
M mythtv/libs/libmythupnp/ssdp.cpp
M mythtv/programs/mythfrontend/playbackbox.cpp
M mythtv/programs/mythfrontend/videodlg.cpp

Log Message:
-----------
Negative random value where positive value is required

The function MythRandom(), introduced in commit 31a811e54e21ac4160a3ed533f965eb9caeb4f7b,
does create a 32-bit random value which is returned in an uint32_t.
This new function does replace the Linux system call random() which returns an int.
Note that int value returned by random() is always positive.
In places where an int is required the output of MythRandom() is cast to an int.
This value can however be negative and will be approximately 50% of the times it is called.
This is now fixed in the places where it had not been fixed alreay.


_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits