@samitouri / QOSamiQemu / commits / f917c060ee

ui: remove redundant use of error_printf_unless_qmp()

The vnc_display_print_local_addr() method is intended to print the VNC listening address on the console at startup, so the user can see the auto-chosen port address when using the 'to=' flag. This is only called by vnc_display_open() which is in the QEMU startup callpath. The check for not being in QMP is thus redundant and can be removed. Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Daniel P. Berrangé committed Jan 14, 2026 at 11:56 UTC f917c060ee53765b2ce82f322d1d0ec76bd319e1
1 file changed +3 -3
ui/vnc.c
+3 -3
@@ -3578,9 +3578,9 @@ static void vnc_display_print_local_addr(VncDisplay *vd)
3578 qapi_free_SocketAddress(addr);
3579 return;
3580 }
3581 - error_printf_unless_qmp("VNC server running on %s:%s\n",
3582 - addr->u.inet.host,
3583 - addr->u.inet.port);
3581 + error_printf("VNC server running on %s:%s\n",
3582 + addr->u.inet.host,
3583 + addr->u.inet.port);
3584 qapi_free_SocketAddress(addr);
3585 }
3586