@samitouri / QOSamiQemu / commits / e33c5ac0d8

monitor: Better express monitor_read()'s opaque arg is of Monitor type

monitor_read() is a IOReadHandler handler, called by qemu_chr_fe_set_handlers() with a Monitor* opaque argument. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812211708.92824-20-philmd@oss.qualcomm.com>

Philippe Mathieu-Daudé committed Aug 12, 2026 at 22:39 UTC e33c5ac0d8ce64b9e08d7309ea5a3448edb3a13e
1 file changed +2 -1
monitor/hmp.c
+2 -1
@@ -1519,7 +1519,8 @@ cleanup:
1519
1520 static void monitor_read(void *opaque, const uint8_t *buf, int size)
1521 {
1522 - MonitorHMP *hmp = container_of(opaque, MonitorHMP, parent_obj);
1522 + Monitor *mon = opaque;
1523 + MonitorHMP *hmp = container_of(mon, MonitorHMP, parent_obj);
1524 int i;
1525
1526 if (hmp->rs) {