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 /android/a2dp.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 'android/a2dp.c')
-rw-r--r-- | android/a2dp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/android/a2dp.c b/android/a2dp.c index 029107cf5..ee607a32d 100644 --- a/android/a2dp.c +++ b/android/a2dp.c @@ -26,6 +26,7 @@ #include "lib/sdp_lib.h" #include "profiles/audio/a2dp-codecs.h" #include "src/shared/queue.h" +#include "src/shared/util.h" #include "src/log.h" #include "hal-msg.h" #include "ipc-common.h" @@ -428,7 +429,7 @@ static struct a2dp_preset *sbc_select_range(void *caps, uint8_t caps_len, p = g_new0(struct a2dp_preset, 1); p->len = conf_len; - p->data = g_memdup(conf, p->len); + p->data = util_memdup(conf, p->len); return p; } @@ -448,7 +449,7 @@ static struct a2dp_preset *aac_select_range(void *caps, uint8_t caps_len, p = g_new0(struct a2dp_preset, 1); p->len = conf_len; - p->data = g_memdup(conf, p->len); + p->data = util_memdup(conf, p->len); return p; } @@ -1036,7 +1037,7 @@ static gboolean sep_setconf_ind(struct avdtp *session, preset = g_new0(struct a2dp_preset, 1); preset->len = cap->length - sizeof(*codec); - preset->data = g_memdup(codec->data, preset->len); + preset->data = util_memdup(codec->data, preset->len); if (check_config(endpoint, preset) < 0) { preset_free(preset); @@ -1365,7 +1366,7 @@ static GSList *parse_presets(const struct audio_preset *p, uint8_t count, preset = g_new0(struct a2dp_preset, 1); preset->len = p->len; - preset->data = g_memdup(p->data, preset->len); + preset->data = util_memdup(p->data, preset->len); l = g_slist_append(l, preset); len -= preset->len; |