monitor_read() is a IOReadHandler handler, called by qemu_chr_fe_set_handlers() with a Monitor* opaque argument.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]> --- monitor/hmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitor/hmp.c b/monitor/hmp.c index cbf7a114c0c..46f8d4a6ede 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -1519,7 +1519,8 @@ cleanup: static void monitor_read(void *opaque, const uint8_t *buf, int size) { - MonitorHMP *hmp = container_of(opaque, MonitorHMP, parent_obj); + Monitor *mon = opaque; + MonitorHMP *hmp = container_of(mon, MonitorHMP, parent_obj); int i; if (hmp->rs) { -- 2.53.0
