From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fKmrj-0001rH-02 for qemu-devel@nongnu.org; Mon, 21 May 2018 11:36:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fKmrg-0005KW-Bx for qemu-devel@nongnu.org; Mon, 21 May 2018 11:36:51 -0400 Received: from zucker2.schokokeks.org ([178.63.68.90]:51641) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fKmrg-0005J6-5a for qemu-devel@nongnu.org; Mon, 21 May 2018 11:36:48 -0400 From: Simon Ruderich Date: Mon, 21 May 2018 17:36:43 +0200 Message-Id: In-Reply-To: References: <0e59c79ddc01e195ddc59d77d9df2b95bf89b600.1523395243.git.simon@ruderich.org> In-Reply-To: References: Subject: [Qemu-devel] [PATCH v3 4/5] hmp: don't truncate size in hmp_memsave/hmp_pmemsave List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eric Blake , Simon Ruderich The called function takes an uint64_t as size parameter and qdict_get_int() returns an uint64_t. Don't truncate it needlessly to an uint32_t. Signed-off-by: Simon Ruderich Reviewed-by: Eric Blake --- hmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hmp.c b/hmp.c index ef93f4878b..a4d28913bb 100644 --- a/hmp.c +++ b/hmp.c @@ -1079,7 +1079,7 @@ void hmp_cpu(Monitor *mon, const QDict *qdict) void hmp_memsave(Monitor *mon, const QDict *qdict) { - uint32_t size = qdict_get_int(qdict, "size"); + uint64_t size = qdict_get_int(qdict, "size"); const char *filename = qdict_get_str(qdict, "filename"); uint64_t addr = qdict_get_int(qdict, "val"); Error *err = NULL; @@ -1096,7 +1096,7 @@ void hmp_memsave(Monitor *mon, const QDict *qdict) void hmp_pmemsave(Monitor *mon, const QDict *qdict) { - uint32_t size = qdict_get_int(qdict, "size"); + uint64_t size = qdict_get_int(qdict, "size"); const char *filename = qdict_get_str(qdict, "filename"); uint64_t addr = qdict_get_int(qdict, "val"); Error *err = NULL; -- 2.15.0