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 <marcandre.lureau@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Marc-André Lureau 2017-01-27 12:54:50 +04:00
parent 14324f585d
commit e703dcbaee
2 changed files with 4 additions and 6 deletions

View File

@ -610,7 +610,10 @@ void timer_deinit(QEMUTimer *ts);
* *
* Free a timer (it must not be on the active list) * 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: * timer_del:

View File

@ -355,11 +355,6 @@ void timer_deinit(QEMUTimer *ts)
ts->timer_list = NULL; ts->timer_list = NULL;
} }
void timer_free(QEMUTimer *ts)
{
g_free(ts);
}
static void timer_del_locked(QEMUTimerList *timer_list, QEMUTimer *ts) static void timer_del_locked(QEMUTimerList *timer_list, QEMUTimer *ts)
{ {
QEMUTimer **pt, *t; QEMUTimer **pt, *t;