From 2fc5d01bb43049851a95c8a66df7ee33e3489b54 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 13 Nov 2020 12:43:24 +0100 Subject: 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 Message-Id: <20201113114326.97663-2-kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- monitor/hmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'monitor/hmp.c') diff --git a/monitor/hmp.c b/monitor/hmp.c index c5cd9d3..1204233 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(®, buf); + ret = get_monitor_def(mon, ®, buf); if (ret < 0) { expr_error(mon, "unknown register"); } -- cgit v1.1