diff options
author | Micael Karlberg <[email protected]> | 2019-05-07 14:59:22 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-05-22 18:21:02 +0200 |
commit | 3f490bea2e21871f534cdcd49d85314eb35f0164 (patch) | |
tree | edcf27f43e6589e1681736baf16d4c9b4c334b9c /lib/snmp/src/app | |
parent | 6d955c8377f4df9c215424349050b38b8c7628b4 (diff) | |
download | otp-3f490bea2e21871f534cdcd49d85314eb35f0164.tar.gz otp-3f490bea2e21871f534cdcd49d85314eb35f0164.tar.bz2 otp-3f490bea2e21871f534cdcd49d85314eb35f0164.zip |
[snmp] Replaced usage of random with rand
Use of the deprecated module random has been replaced
by the module rand.
OTP-15331
Diffstat (limited to 'lib/snmp/src/app')
-rw-r--r-- | lib/snmp/src/app/snmp_internal.hrl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/snmp/src/app/snmp_internal.hrl b/lib/snmp/src/app/snmp_internal.hrl index 97a7c63ef1..f9a758ab7b 100644 --- a/lib/snmp/src/app/snmp_internal.hrl +++ b/lib/snmp/src/app/snmp_internal.hrl @@ -25,6 +25,13 @@ -define(APPLICATION, snmp). -endif. + +-define(SNMP_RAND_SEED_ALG, exrop). +-define(SNMP_RAND_SEED(), rand:seed(?SNMP_RAND_SEED_ALG, + {erlang:phash2([node()]), + erlang:monotonic_time(), + erlang:unique_integer()})). + -define(snmp_info(C, F, A), ?snmp_msg(info_msg, C, F, A)). -define(snmp_warning(C, F, A), ?snmp_msg(warning_msg, C, F, A)). -define(snmp_error(C, F, A), ?snmp_msg(error_msg, C, F, A)). @@ -37,5 +44,3 @@ -endif. % -ifdef(snmp_internal). - - |