[Qemu-devel] [PATCH v4 16/24] linux-user: Remove srand call

Richard Henderson posted 24 patches 6 years, 9 months ago
Maintainers: David Gibson <david@gibson.dropbear.id.au>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <rth@twiddle.net>, Eduardo Habkost <ehabkost@redhat.com>, Joel Stanley <joel@jms.id.au>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
[Qemu-devel] [PATCH v4 16/24] linux-user: Remove srand call
Posted by Richard Henderson 6 years, 9 months ago
We no longer use rand() within linux-user.

Cc: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 linux-user/main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index e05aebe4e1..5d1c6a115b 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -623,8 +623,6 @@ int main(int argc, char **argv, char **envp)
 
     cpu_model = NULL;
 
-    srand(time(NULL));
-
     qemu_add_opts(&qemu_trace_opts);
 
     optind = parse_args(argc, argv);
-- 
2.17.1


Re: [Qemu-devel] [PATCH v4 16/24] linux-user: Remove srand call
Posted by Laurent Vivier 6 years, 9 months ago
On 06/05/2019 19:33, Richard Henderson wrote:
> We no longer use rand() within linux-user.
> 
> Cc: Laurent Vivier <laurent@vivier.eu>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   linux-user/main.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/linux-user/main.c b/linux-user/main.c
> index e05aebe4e1..5d1c6a115b 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -623,8 +623,6 @@ int main(int argc, char **argv, char **envp)
>   
>       cpu_model = NULL;
>   
> -    srand(time(NULL));
> -
>       qemu_add_opts(&qemu_trace_opts);
>   
>       optind = parse_args(argc, argv);
> 

Move the one from PATCH 12 here.

Thanks,
Laurent