Skip to content

Commit

Permalink
Replaced random_uniform/1 by rand:uniform/1
Browse files Browse the repository at this point in the history
* leftover of 5118421
* code base contains only one occurence of random_uniform/1

```
$ git grep random_uniform
src/ec_file.erl:    UniqueNumber = erlang:integer_to_list(erlang:trunc(random_uniform() * 1000000000000)),
src/ec_file.erl:random_uniform() ->
```
  • Loading branch information
Ariel Otilibili committed Jun 13, 2024
1 parent 1a42c54 commit 8ec51ca
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/ec_file.erl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ real_dir_path(Path) ->
%% function of the same name.
-spec insecure_mkdtemp() -> TmpDirPath::file:name() | {error, term()}.
insecure_mkdtemp() ->
UniqueNumber = erlang:integer_to_list(erlang:trunc(random_uniform() * 1000000000000)),
UniqueNumber = erlang:integer_to_list(erlang:trunc(rand:uniform() * 1000_000_000_000)),
TmpDirPath =
filename:join([tmp(), lists:flatten([".tmp_dir", UniqueNumber])]),

Expand Down Expand Up @@ -376,9 +376,6 @@ sub_files(From) ->
{ok, SubFiles} = file:list_dir(From),
[filename:join(From, SubFile) || SubFile <- SubFiles].

random_uniform() ->
rand:uniform().

%%%===================================================================
%%% Test Functions
%%%===================================================================
Expand Down

0 comments on commit 8ec51ca

Please sign in to comment.