From e78cdc59e75e5f76bb63bc6a5de30493a082ac16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sat, 27 Aug 2016 16:16:41 -0400 Subject: [PATCH] destroy_text must conform to bt_component_destroy_cb MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- plugins/text/text.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/text/text.c b/plugins/text/text.c index a126b6f0f..8f72b999e 100644 --- a/plugins/text/text.c +++ b/plugins/text/text.c @@ -99,13 +99,9 @@ struct text_component *create_text(void) return g_new0(struct text_component, 1); } -static void destroy_text(struct text_component *text) +static void destroy_text(void *data) { - if (!text) { - return; - } - - g_free(text); + g_free(data); } static @@ -128,7 +124,7 @@ enum bt_component_status text_component_init( } ret = bt_component_set_destroy_cb(component, - (bt_component_destroy_cb) destroy_text); + destroy_text); if (ret != BT_COMPONENT_STATUS_OK) { goto error; } -- 2.34.1