From nobody Mon Feb 9 13:59:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 154229154114545.17491363219767; Thu, 15 Nov 2018 06:19:01 -0800 (PST) Received: from localhost ([::1]:39056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNIU0-0007on-24 for importer@patchew.org; Thu, 15 Nov 2018 09:19:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNIIv-00071c-Ia for qemu-devel@nongnu.org; Thu, 15 Nov 2018 09:07:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNIIu-0005MP-Hr for qemu-devel@nongnu.org; Thu, 15 Nov 2018 09:07:33 -0500 Received: from zucker2.schokokeks.org ([178.63.68.90]:50591) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gNIIq-0005HR-L3 for qemu-devel@nongnu.org; Thu, 15 Nov 2018 09:07:30 -0500 Received: from blood-stain-child.lan.ruderich.org (localhost [::1]) (AUTH: PLAIN simon@ruderich.org, TLS: TLSv1/SSLv3, 128bits, ECDHE-RSA-AES128-GCM-SHA256) by zucker.schokokeks.org with ESMTPSA; Thu, 15 Nov 2018 15:07:19 +0100 id 000000000000005E.000000005BED7D97.00002723 From: Simon Ruderich To: qemu-devel@nongnu.org Date: Thu, 15 Nov 2018 15:07:14 +0100 Message-Id: <1238ad452bdff19db593dd11cb4a4c64ed5b9da8.1542290622.git.simon@ruderich.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mime-Autoconverted: from 8bit to 7bit by courier 0.75 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.63.68.90 Subject: [Qemu-devel] [PATCH v8 3/7] cpus: use size_t in qmp_memsave/qmp_pmemsave 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: Simon Ruderich , David Alan Gilbert , Markus Armbruster , Peter Crosthwaite , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" It's the natural type for object sizes and matches the return value of sizeof(buf). Reviewed-by: Eric Blake Signed-off-by: Simon Ruderich --- cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index c0d796f441..ee54595733 100644 --- a/cpus.c +++ b/cpus.c @@ -2370,7 +2370,7 @@ void qmp_memsave(int64_t addr, int64_t size, const ch= ar *filename, bool has_cpu, int64_t cpu_index, Error **errp) { int fd; - uint32_t l; + size_t l; CPUState *cpu; uint8_t buf[1024]; int64_t orig_addr =3D addr, orig_size =3D size; @@ -2418,7 +2418,7 @@ void qmp_pmemsave(int64_t addr, int64_t size, const c= har *filename, Error **errp) { int fd; - uint32_t l; + size_t l; uint8_t buf[1024]; =20 fd =3D qemu_open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 06= 00); --=20 2.19.1