cur_mon is updated relatively early in the command handling code even
though only the command handler actually needs it. Move it to
handle_hmp_command().
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
monitor/hmp.c | 23 ++++++++++++-----------
monitor/misc.c | 7 -------
2 files changed, 12 insertions(+), 18 deletions(-)
@@ -258,7 +252,6 @@ static void monitor_init_qmp_commands(void)
/* Set the current CPU defined by the user. Callers must hold BQL. */
int monitor_set_cpu(Monitor *mon, int cpu_index)
{
- Monitor *cur_mon = monitor_cur();
CPUState *cpu;
cpu = qemu_get_cpu(cpu_index);