From: Jérémie Galarneau Date: Sat, 27 Aug 2016 20:16:41 +0000 (-0400) Subject: destroy_text must conform to bt_component_destroy_cb X-Git-Tag: v2.0.0-pre1~785 X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=e78cdc59e75e5f76bb63bc6a5de30493a082ac16;p=babeltrace.git destroy_text must conform to bt_component_destroy_cb Signed-off-by: Jérémie Galarneau --- diff --git a/plugins/text/text.c b/plugins/text/text.c index a126b6f0..8f72b999 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; }