[Qemu-devel] [PATCH v3 15/23] linux-user: Remove srand call

Richard Henderson posted 23 patches 6 years, 7 months ago
Maintainers: David Gibson <david@gibson.dropbear.id.au>, Laurent Vivier <laurent@vivier.eu>, Riku Voipio <riku.voipio@iki.fi>, Paolo Bonzini <pbonzini@redhat.com>, Joel Stanley <joel@jms.id.au>, Peter Maydell <peter.maydell@linaro.org>, Richard Henderson <rth@twiddle.net>, Eduardo Habkost <ehabkost@redhat.com>, Igor Mitsyanko <i.mitsyanko@gmail.com>, Gerd Hoffmann <kraxel@redhat.com>
There is a newer version of this series
[Qemu-devel] [PATCH v3 15/23] linux-user: Remove srand call
Posted by Richard Henderson 6 years, 7 months ago
We no longer use rand() within linux-user.

Cc: Laurent Vivier <laurent@vivier.eu>
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 8478306eef..80cb9fdfbe 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -621,8 +621,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.2


Re: [Qemu-devel] [PATCH v3 15/23] linux-user: Remove srand call
Posted by Philippe Mathieu-Daudé 6 years, 7 months ago
On 3/15/19 4:26 AM, Richard Henderson wrote:
> We no longer use rand() within linux-user.
> 
> Cc: Laurent Vivier <laurent@vivier.eu>
> 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 8478306eef..80cb9fdfbe 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -621,8 +621,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);
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>