aboutsummaryrefslogtreecommitdiff
path: root/monitor/hmp.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-11-13 12:43:24 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-11-13 12:45:35 +0000
commit2fc5d01bb43049851a95c8a66df7ee33e3489b54 (patch)
tree1e74f5edf47a4672ba529ae05f536a1abf0aa5fd /monitor/hmp.c
parentbe2df2ac6f6b9eeee21cc057de0a119ac30fbc60 (diff)
hmp: Pass monitor to mon_get_cpu()
mon_get_cpu() is indirectly called monitor_parse_arguments() where the current monitor isn't set yet. Instead of using monitor_cur(), explicitly pass the Monitor pointer to the function. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20201113114326.97663-2-kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'monitor/hmp.c')
-rw-r--r--monitor/hmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor/hmp.c b/monitor/hmp.c
index c5cd9d372b..1204233999 100644
--- a/monitor/hmp.c
+++ b/monitor/hmp.c
@@ -384,7 +384,7 @@ static int64_t expr_unary(Monitor *mon)
pch++;
}
*q = 0;
- ret = get_monitor_def(&reg, buf);
+ ret = get_monitor_def(mon, &reg, buf);
if (ret < 0) {
expr_error(mon, "unknown register");
}