From patchwork Wed May 22 18:42:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164875 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1244711ili; Wed, 22 May 2019 12:18:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeIUkZow/1VXmejH1SDGxBDjV68eNbryyIgaVfXvgYMx4vs7pbS4j9t2gA0MwnYSwFgOtQ X-Received: by 2002:a50:95b0:: with SMTP id w45mr92755524eda.221.1558552738622; Wed, 22 May 2019 12:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558552738; cv=none; d=google.com; s=arc-20160816; b=UdfcDrypN1Ws+f230XVShWjhajRp0by1uljgy217Lh/WhIoVTyAsEFal08BOomQQ6v Y71mXBdzjeAFmuTArd9AUkmjW9Ayi5W0RBugttKgvcHMXYHj+sHG5CygQI2p8Dp870Z7 EF9BuuUoNZKf0IwQKP7q4V2L+N63F/mw+7McZmOEXYgeTEo21FKkgq0gBRKjXuNsCAFK F1e8Yc2AX+poYptwrk3RcWG0Jb3hOb2gDbv9+5IxA8WoyMgRPbSiIx5guCVHjj8YZZUx cnTxqv7G22HvpenvuNu0Wx+NyNMtKeevOg3Tqu1w1P9BeEl2S4KloDrtqRTVe1wkwxAM Zn7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=cAffAFBxa4y/VVbarNUiRFSP9To260Z9zDP/Ls36OfI=; b=UQ11n8SAI+EK6fKsue4LdlAJuUUxuhlltetc/T6IPNgAalLtDL1XiInT3p0EFy9b1/ 5rEhX7mdt4JPXEXQtSRJEIIUXh7uZjQVfREkES8N1nWkEzjQggC1QOWFy02u62kXI1HI mnmnxEZ5PPJRDwrLrifBgb/rNX0w08yMrZE2hoMd4mGw0KzamG7hnAtntP+xhG3aOi2Y nQionNS8czxCXJ0YaAY9jJYZBlx3wf6dsEQKTcv2+kGIx2xdJyFR/iWZClOoedMnpdwh KjdbTKNUiG9MQTKAjM+4jnc0cyA8h1sUQIgxC6ZgjEKn0iHGpBVThcoVsVfxTG7MBddB r4wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aFbsH48F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m18si6496741edm.173.2019.05.22.12.18.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 22 May 2019 12:18:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aFbsH48F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:49969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTWlN-0003gE-Gj for patch@linaro.org; Wed, 22 May 2019 15:18:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTWOo-0008P8-Oe for qemu-devel@nongnu.org; Wed, 22 May 2019 14:55:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTWCN-00089P-Uy for qemu-devel@nongnu.org; Wed, 22 May 2019 14:42:49 -0400 Received: from mail-yw1-xc2f.google.com ([2607:f8b0:4864:20::c2f]:35734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTWCN-00088A-PY for qemu-devel@nongnu.org; Wed, 22 May 2019 14:42:47 -0400 Received: by mail-yw1-xc2f.google.com with SMTP id k128so1248154ywf.2 for ; Wed, 22 May 2019 11:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cAffAFBxa4y/VVbarNUiRFSP9To260Z9zDP/Ls36OfI=; b=aFbsH48F39Xybci721A/f/XujFCOPwXRHQJY0y83RsgL3CsRY7y4Bx5W3NWKKmdiVE 7JaMgeXYGtwj1ue/MlqLlofh/eyF7gyc6z2jnPl2mtzHJB0Z4DQh98S9iqRHM/dYcINP JZVXM+YykQwCEap5W59L4mlv3bHTP7Lh8WbfVir/o+nGvNyIRFMJulCbS1wba9DUFJVZ EB3uryMoGvrUmUGarf7Kec+z8V86Z65zkc3/rmplPZyI3o0LGEoo+bK7P91hvwk13Pjj RnQ7D9SB94vC2arWx0AiOjKHMH3G/W0M+vzDEYhf+y7y6bbj1GMMDDcM4UCG9UhoCedk lp5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cAffAFBxa4y/VVbarNUiRFSP9To260Z9zDP/Ls36OfI=; b=HvZ/UmBcRyp95HvExuGZpTu48HuCBRfUZS0Psf5WYziJ1njrvLA60Tj67IR6VWbSMh c+Rkn8M8p/7xZuhcwtYch0qNbzpBs5/VydeTrNTkcRDt+JP5/gRJsvnOY95VIB0UeAqS KvdhLHv5QPo7A24DoELIeL7HvAkUxPrhmnc5udVbAtGOzTt2GoLuYxvGob3+Kto3xjmc 5yXiy5Pf+3sVhVtXmuQ6lvvO5mt914t7hUYN14eTwFWyEUC+6BbubnstpkhseLr0LkvG mHGtQdM6M5xeyOVoNuRoSUcxNyh0zaQespAAXV1pFRUdzIS+TL1euymrSY6JH8+kMW21 SCOg== X-Gm-Message-State: APjAAAX+A+dXpuHlOn1IFNwbfFyiH2+m0mvhGKGwrKnmHKPWy/QkwwqF f3uHvtnZddTwFsQM9SvIVEZz1Bsbnxk= X-Received: by 2002:a0d:dbc1:: with SMTP id d184mr18034660ywe.18.1558550565413; Wed, 22 May 2019 11:42:45 -0700 (PDT) Received: from localhost.localdomain ([71.46.56.17]) by smtp.gmail.com with ESMTPSA id 206sm1299445ywq.74.2019.05.22.11.42.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 11:42:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 22 May 2019 14:42:17 -0400 Message-Id: <20190522184226.17871-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190522184226.17871-1-richard.henderson@linaro.org> References: <20190522184226.17871-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::c2f Subject: [Qemu-devel] [PULL 16/25] linux-user: Remove srand call X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We no longer use rand() within linux-user. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 11 ----------- 1 file changed, 11 deletions(-) -- 2.17.1 diff --git a/linux-user/main.c b/linux-user/main.c index 66c909a1a6..689bcf436d 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);