Skip to content

Commit 187c614

Browse files
Vladimir Sementsov-OgievskiyMarkus Armbruster
authored andcommitted
hmp: drop Error pointer indirection in hmp_handle_error
We don't need Error **, as all callers pass local Error object, which isn't used after the call. Use Error * instead. Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> Acked-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Message-Id: <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Markus Armbruster <[email protected]>
1 parent 49fbc72 commit 187c614

File tree

6 files changed

+87
-88
lines changed

6 files changed

+87
-88
lines changed

dump/dump-hmp-cmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict)
3232

3333
if (zlib + lzo + snappy + win_dmp > 1) {
3434
error_setg(&err, "only one of '-z|-l|-s|-w' can be set");
35-
hmp_handle_error(mon, &err);
35+
hmp_handle_error(mon, err);
3636
return;
3737
}
3838

@@ -66,7 +66,7 @@ void hmp_dump_guest_memory(Monitor *mon, const QDict *qdict)
6666

6767
qmp_dump_guest_memory(paging, prot, true, detach, has_begin, begin,
6868
has_length, length, true, dump_format, &err);
69-
hmp_handle_error(mon, &err);
69+
hmp_handle_error(mon, err);
7070
g_free(prot);
7171
}
7272

hw/core/machine-hmp-cmds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void hmp_cpu_add(Monitor *mon, const QDict *qdict)
5555

5656
cpuid = qdict_get_int(qdict, "id");
5757
qmp_cpu_add(cpuid, &err);
58-
hmp_handle_error(mon, &err);
58+
hmp_handle_error(mon, err);
5959
}
6060

6161
void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict)
@@ -66,7 +66,7 @@ void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict)
6666
CpuInstanceProperties *c;
6767

6868
if (err != NULL) {
69-
hmp_handle_error(mon, &err);
69+
hmp_handle_error(mon, err);
7070
return;
7171
}
7272

@@ -135,7 +135,7 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)
135135
monitor_printf(mon, "\n");
136136

137137
qapi_free_MemdevList(memdev_list);
138-
hmp_handle_error(mon, &err);
138+
hmp_handle_error(mon, err);
139139
}
140140

141141
void hmp_info_numa(Monitor *mon, const QDict *qdict)

include/monitor/hmp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "qemu/readline.h"
1818

19-
void hmp_handle_error(Monitor *mon, Error **errp);
19+
void hmp_handle_error(Monitor *mon, Error *err);
2020

2121
void hmp_info_name(Monitor *mon, const QDict *qdict);
2222
void hmp_info_version(Monitor *mon, const QDict *qdict);

0 commit comments

Comments
 (0)