aboutsummaryrefslogtreecommitdiff
path: root/monitor/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor/misc.c')
-rw-r--r--monitor/misc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/monitor/misc.c b/monitor/misc.c
index 3baa15f3bf..a04d7edde0 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -106,9 +106,6 @@ struct MonFdset {
QLIST_ENTRY(MonFdset) next;
};
-/* QMP checker flags */
-#define QMP_ACCEPT_UNKNOWNS 1
-
/* Protects mon_fdsets */
static QemuMutex mon_fdsets_lock;
static QLIST_HEAD(, MonFdset) mon_fdsets;
@@ -394,7 +391,7 @@ int monitor_set_cpu(int cpu_index)
/* Callers must hold BQL. */
static CPUState *mon_get_cpu_sync(bool synchronize)
{
- CPUState *cpu;
+ CPUState *cpu = NULL;
if (cur_mon->mon_cpu_path) {
cpu = (CPUState *) object_resolve_path_type(cur_mon->mon_cpu_path,
@@ -411,6 +408,7 @@ static CPUState *mon_get_cpu_sync(bool synchronize)
monitor_set_cpu(first_cpu->cpu_index);
cpu = first_cpu;
}
+ assert(cpu != NULL);
if (synchronize) {
cpu_synchronize_state(cpu);
}