From ac7ff4cf5f20eee8cec228209f6b3ca557c60639 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 17 Apr 2019 21:17:54 +0200 Subject: qsp: Simplify how qsp_report() prints qsp_report() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_sync_profile() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly. Drop the callback, and call qemu_printf() instead. Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert Message-Id: <20190417191805.28198-7-armbru@redhat.com> --- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 7573689585..1650ceec3a 100644 --- a/monitor.c +++ b/monitor.c @@ -1336,7 +1336,7 @@ static void hmp_info_sync_profile(Monitor *mon, const QDict *qdict) enum QSPSortBy sort_by; sort_by = mean ? QSP_SORT_BY_AVG_WAIT_TIME : QSP_SORT_BY_TOTAL_WAIT_TIME; - qsp_report((FILE *)mon, monitor_fprintf, max, sort_by, coalesce); + qsp_report(max, sort_by, coalesce); } static void hmp_info_history(Monitor *mon, const QDict *qdict) -- cgit v1.2.3