summaryrefslogtreecommitdiff
path: root/gobex/gobex-packet.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2018-05-23 16:32:22 +0200
committerMarcel Holtmann <marcel@holtmann.org>2018-05-23 16:32:22 +0200
commit67a2c40e65703cccd9f0706be70cac04693677f5 (patch)
tree4db807531bbe76e6a7bd53ce4d4f5c54ca3b3dc7 /gobex/gobex-packet.c
parent01333078f591969f885bb94187a91d35e8fd5388 (diff)
downloadbluez-67a2c40e65703cccd9f0706be70cac04693677f5.tar.gz
gobex: Fix compiler warning from casting functions
Diffstat (limited to 'gobex/gobex-packet.c')
-rw-r--r--gobex/gobex-packet.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c
index cd5c131a0..a89f5b6d3 100644
--- a/gobex/gobex-packet.c
+++ b/gobex/gobex-packet.c
@@ -260,6 +260,11 @@ GObexPacket *g_obex_packet_new(guint8 opcode, gboolean final,
return pkt;
}
+static void header_free(void *data, void *user_data)
+{
+ g_obex_header_free(data);
+}
+
void g_obex_packet_free(GObexPacket *pkt)
{
g_obex_debug(G_OBEX_DEBUG_PACKET, "opcode 0x%02x", pkt->opcode);
@@ -273,7 +278,7 @@ void g_obex_packet_free(GObexPacket *pkt)
break;
}
- g_slist_foreach(pkt->headers, (GFunc) g_obex_header_free, NULL);
+ g_slist_foreach(pkt->headers, header_free, NULL);
g_slist_free(pkt->headers);
g_free(pkt);
}