From nobody Tue Feb 10 14:32:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1606269585; cv=none; d=zohomail.com; s=zohoarc; b=WMQPF5eQvYsPPVCTcQcbPFtb31dv7bt0dmqCKmk3Q0z1XYNbBVcZwQOoO/K1kcI8M6GrdM7WTwb7vX+Euj5SaBYVoIA/szXD29F0z8zUPaThanShuDqr7YAmeU5GlbWNpcaGxBcdJZYx+F6eo0Mf2a8BbhqooCgeWLlDqRADns0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606269585; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6PI7T73vNlcirsQiXLN2cSQVfwyPIkBFvkIU24FSEjQ=; b=AG6YdekIxQKj+TIDiUxRiTHS+X+gH4R+vB70xD5Xw9LE6vba4BKQoL6DTngm/GmAX0Or0X516/tsWvl6t68C5aOw4AXdZeoh0areakqVvYIJ2sa570D7mOuNA94+CIGyBPS24fyHLda7swbPYqp0nuZQQ/D7L2uN9yJyy3HdC/s= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1606269585502649.315664986373; Tue, 24 Nov 2020 17:59:45 -0800 (PST) Received: from localhost ([::1]:51196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khk5w-0000Wf-7f for importer@patchew.org; Tue, 24 Nov 2020 20:59:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khk44-0007o8-VU for qemu-devel@nongnu.org; Tue, 24 Nov 2020 20:57:49 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:2099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khk41-0007P9-3n for qemu-devel@nongnu.org; Tue, 24 Nov 2020 20:57:48 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4CgkXs2Vl5zhYm4; Wed, 25 Nov 2020 09:57:17 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Wed, 25 Nov 2020 09:57:22 +0800 From: Yutao Ai To: , Subject: [PATCH 2/3] monitor:braces {} are necessary for all arms of this statement Date: Wed, 25 Nov 2020 01:45:13 +0000 Message-ID: <20201125014514.55562-3-aiyutao@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20201125014514.55562-1-aiyutao@huawei.com> References: <20201125014514.55562-1-aiyutao@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.32; envelope-from=aiyutao@huawei.com; helo=szxga06-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.chen@huawei.com, aiyutao@huawei.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Fix the errors by add {} Signed-off-by: Yutao Ai --- monitor/misc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/monitor/misc.c b/monitor/misc.c index 398211a034..7588f12053 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -492,8 +492,10 @@ static void hmp_singlestep(Monitor *mon, const QDict *= qdict) static void hmp_gdbserver(Monitor *mon, const QDict *qdict) { const char *device =3D qdict_get_try_str(qdict, "device"); - if (!device) + if (!device) { device =3D "tcp::" DEFAULT_GDBSTUB_PORT; + } + if (gdbserver_start(device) < 0) { monitor_printf(mon, "Could not open gdbserver on device '%s'\n", device); @@ -559,10 +561,11 @@ static void memory_dump(Monitor *mon, int count, int = format, int wsize, } =20 len =3D wsize * count; - if (wsize =3D=3D 1) + if (wsize =3D=3D 1) { line_size =3D 8; - else + } else { line_size =3D 16; + } max_digits =3D 0; =20 switch(format) { @@ -583,10 +586,11 @@ static void memory_dump(Monitor *mon, int count, int = format, int wsize, } =20 while (len > 0) { - if (is_physical) + if (is_physical) { monitor_printf(mon, TARGET_FMT_plx ":", addr); - else + } else { monitor_printf(mon, TARGET_FMT_lx ":", (target_ulong)addr); + } l =3D len; if (l > line_size) l =3D line_size; --=20 2.19.1