From: Marc-André Lureau Date: Fri, 27 Jan 2017 08:54:50 +0000 (+0400) Subject: timer: use an inline function for free X-Git-Tag: v2.9.0-rc0~42^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e703dcbaeef6973e788a9a8d19e53094b50c0a7c;p=thirdparty%2Fqemu.git timer: use an inline function for free Similarly to allocation, do it from an inline function. This allows tests to only use the headers for allocation/free of timer. Signed-off-by: Marc-André Lureau Reviewed-by: Greg Kurz Reviewed-by: Paolo Bonzini --- diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 9abed51ae85..26e628584c3 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -610,7 +610,10 @@ void timer_deinit(QEMUTimer *ts); * * Free a timer (it must not be on the active list) */ -void timer_free(QEMUTimer *ts); +static inline void timer_free(QEMUTimer *ts) +{ + g_free(ts); +} /** * timer_del: diff --git a/util/qemu-timer.c b/util/qemu-timer.c index ff620ecff7d..6cf70b96f63 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -355,11 +355,6 @@ void timer_deinit(QEMUTimer *ts) ts->timer_list = NULL; } -void timer_free(QEMUTimer *ts) -{ - g_free(ts); -} - static void timer_del_locked(QEMUTimerList *timer_list, QEMUTimer *ts) { QEMUTimer **pt, *t;