From e2c7c6a454c2c4221461aa04e4061dbb91b4986c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 17 Apr 2022 11:29:43 -0700 Subject: util/log: Return bool from qemu_set_log_filename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the recommendations in qapi/error.h, return false on failure. Use the return value in the monitor, the only place we aren't already passing error_fatal or error_abort. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-Id: <20220417183019.755276-4-richard.henderson@linaro.org> --- monitor/misc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'monitor') diff --git a/monitor/misc.c b/monitor/misc.c index b0fc0e5..4b68fcd 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -419,8 +419,7 @@ static void hmp_logfile(Monitor *mon, const QDict *qdict) { Error *err = NULL; - qemu_set_log_filename(qdict_get_str(qdict, "filename"), &err); - if (err) { + if (!qemu_set_log_filename(qdict_get_str(qdict, "filename"), &err)) { error_report_err(err); } } -- cgit v1.1