destroy_text must conform to bt_component_destroy_cb
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 Aug 2016 20:16:41 +0000 (16:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:05 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/text/text.c

index a126b6f0fa5c2c6d8a5cd6ec0259ed8cfdd0bd1b..8f72b999eb18fc74ea574c9a6ad0cdf767ff9678 100644 (file)
@@ -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;
        }
This page took 0.026502 seconds and 4 git commands to generate.