From: Richard Henderson Date: Wed, 13 Mar 2019 02:24:19 +0000 (-0700) Subject: linux-user: Remove srand call X-Git-Tag: v4.1.0-rc0~93^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79743bdbcb7a1a72e6c8ad4fd0bc946a0c552f88;p=thirdparty%2Fqemu.git linux-user: Remove srand call We no longer use rand() within linux-user. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- diff --git a/linux-user/main.c b/linux-user/main.c index 66c909a1a6b..689bcf436d2 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); @@ -692,15 +690,6 @@ int main(int argc, char **argv, char **envp) { Error *err = NULL; if (seed_optarg != NULL) { - unsigned long long seed; - - /* This will go away with the last user of rand(). */ - if (parse_uint_full(seed_optarg, &seed, 0) != 0) { - fprintf(stderr, "Invalid seed number: %s\n", seed_optarg); - exit(EXIT_FAILURE); - } - srand(seed); - qemu_guest_random_seed_main(seed_optarg, &err); } else { qcrypto_init(&err);