aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_config.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-12-04 12:15:40 +0100
committerBjörn Gustavsson <[email protected]>2015-12-11 14:37:46 +0100
commit80757f9491c72ee262a5910e0b3b02e95b1e5f2a (patch)
tree1019a6da73ac28571a0b51727ed6fa33daf11522 /lib/common_test/src/ct_config.erl
parentdee396ffd32dcd68c47cab983c75ba32f921b9db (diff)
downloadotp-80757f9491c72ee262a5910e0b3b02e95b1e5f2a.tar.gz
otp-80757f9491c72ee262a5910e0b3b02e95b1e5f2a.tar.bz2
otp-80757f9491c72ee262a5910e0b3b02e95b1e5f2a.zip
Use 'rand' instead of the obsolete 'random' module
In most cases, we don't have to seed the random number generator, as the rand:uniform/1 takes care about that itself.
Diffstat (limited to 'lib/common_test/src/ct_config.erl')
-rw-r--r--lib/common_test/src/ct_config.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_config.erl b/lib/common_test/src/ct_config.erl
index 251204aa75..33efe7a14a 100644
--- a/lib/common_test/src/ct_config.erl
+++ b/lib/common_test/src/ct_config.erl
@@ -694,11 +694,10 @@ make_crypto_key(String) ->
{[K1,K2,K3],IVec}.
random_bytes(N) ->
- random:seed(os:timestamp()),
random_bytes_1(N, []).
random_bytes_1(0, Acc) -> Acc;
-random_bytes_1(N, Acc) -> random_bytes_1(N-1, [random:uniform(255)|Acc]).
+random_bytes_1(N, Acc) -> random_bytes_1(N-1, [rand:uniform(255)|Acc]).
check_callback_load(Callback) ->
case code:is_loaded(Callback) of