diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-01-06 12:50:33 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-01-06 12:58:39 -0800 |
commit | cfab569484b18407fc117bb96634525cc76ea1f5 (patch) | |
tree | 754ec37148cc95958f1657e25768ad69565ebf23 /gobex/gobex-packet.c | |
parent | 9f09e69ecb077082301dafb745856e1f3731aaa7 (diff) | |
download | bluez-cfab569484b18407fc117bb96634525cc76ea1f5.tar.gz |
build: Replace use of g_memdup with util_memdup
This replaces the uses of g_memdup with util_memdup since the former has
been deprecated:
warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead
[-Wdeprecated-declarations]
g_memdup2 requires bumping glib version which would likely have its
own problems thus why util_memdup was introduced.
Diffstat (limited to 'gobex/gobex-packet.c')
-rw-r--r-- | gobex/gobex-packet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c index 11937a5a5..8ae78b0f6 100644 --- a/gobex/gobex-packet.c +++ b/gobex/gobex-packet.c @@ -17,6 +17,7 @@ #include "gobex-defs.h" #include "gobex-packet.h" #include "gobex-debug.h" +#include "src/shared/util.h" #define FINAL_BIT 0x80 @@ -201,7 +202,7 @@ gboolean g_obex_packet_set_data(GObexPacket *pkt, const void *data, gsize len, switch (data_policy) { case G_OBEX_DATA_COPY: - pkt->data.buf = g_memdup(data, len); + pkt->data.buf = util_memdup(data, len); break; case G_OBEX_DATA_REF: pkt->data.buf_ref = data; @@ -259,7 +260,7 @@ void g_obex_packet_free(GObexPacket *pkt) switch (pkt->data_policy) { case G_OBEX_DATA_INHERIT: case G_OBEX_DATA_COPY: - g_free(pkt->data.buf); + free(pkt->data.buf); break; case G_OBEX_DATA_REF: break; |