]> git.ipfire.org Git - thirdparty/qemu.git/commit
monitor: refactor error_vprintf()
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 24 Sep 2025 15:12:41 +0000 (16:12 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 5 Mar 2026 17:40:24 +0000 (17:40 +0000)
commitcd670accb5987e68d4e5967922bc79efc10a5e02
tree7701752dfbff8d6fa4e0c28a20275d2cd185e855
parent7818c014ef658ed4477c016fb2b03b351f1e7556
monitor: refactor error_vprintf()

The monitor_vprintf() code will return -1 if either the monitor
is NULL, or the monitor is QMP. The error_vprintf() code can
take advantage of this to avoid having to duplicate the same
checks, and instead simply look at the return value.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
monitor/monitor.c