提交 e703dcba 编写于 作者: M Marc-André Lureau

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: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NGreg Kurz <groug@kaod.org>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 14324f58
......@@ -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:
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册