[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/15] monitor:braces {} are necessary for all arms of this statem
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 02/15] monitor:braces {} are necessary for all arms of this statement |
Date: |
Fri, 18 Dec 2020 10:41:04 +0000 |
From: Yutao Ai <aiyutao@huawei.com>
Fix the errors by add {}
Signed-off-by: Yutao Ai <aiyutao@huawei.com>
Message-Id: <20201125014514.55562-3-aiyutao@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
monitor/misc.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/monitor/misc.c b/monitor/misc.c
index fde6e36a0b..09f9a74d78 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 = qdict_get_try_str(qdict, "device");
- if (!device)
+ if (!device) {
device = "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,
}
len = wsize * count;
- if (wsize == 1)
+ if (wsize == 1) {
line_size = 8;
- else
+ } else {
line_size = 16;
+ }
max_digits = 0;
switch(format) {
@@ -583,10 +586,11 @@ static void memory_dump(Monitor *mon, int count, int
format, int wsize,
}
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 = len;
if (l > line_size)
l = line_size;
--
2.29.2
- [PULL 00/15] migration queue, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 01/15] monitor:open brace '{' following struct go on the same line, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 02/15] monitor:braces {} are necessary for all arms of this statement,
Dr. David Alan Gilbert (git) <=
- [PULL 03/15] monitor:Don't use '#' flag of printf format ('%#') in format strings, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 05/15] virtiofsd: Use --thread-pool-size=0 to mean no thread pool, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 04/15] hmp-commands.hx: List abbreviation after command for cont, quit, print, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 06/15] virtiofsd: make the debug log timestamp on stderr more human-readable, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 07/15] virtiofsd: Set up posix_lock hash table for root inode, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 08/15] virtiofsd: Disable posix_lock hash table if remote locks are not enabled, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 09/15] virtiofsd: Check file type in lo_flush(), Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 10/15] virtiofsd: update FUSE_FORGET comment on "lo_inode.nlookup", Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 11/15] virtiofsd: Remove useless code about send_notify_iov, Dr. David Alan Gilbert (git), 2020/12/18
- [PULL 13/15] savevm: Remove dead code in save_snapshot(), Dr. David Alan Gilbert (git), 2020/12/18