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/avctp.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/avctp.c')
-rw-r--r-- | android/avctp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/android/avctp.c b/android/avctp.c index 14ebbc391..37b4cec4f 100644 --- a/android/avctp.c +++ b/android/avctp.c @@ -31,6 +31,7 @@ #include <glib.h> #include "lib/sdp.h" +#include "src/shared/util.h" #include "src/log.h" #include "avctp.h" @@ -1177,7 +1178,7 @@ static int avctp_send_req(struct avctp *session, uint8_t code, uint8_t subunit, for (i = 0; i < iov_cnt; i++) { pdu[i].iov_len = iov[i].iov_len; - pdu[i].iov_base = g_memdup(iov[i].iov_base, iov[i].iov_len); + pdu[i].iov_base = util_memdup(iov[i].iov_base, iov[i].iov_len); } req = g_new0(struct avctp_control_req, 1); @@ -1218,7 +1219,7 @@ int avctp_send_browsing_req(struct avctp *session, for (i = 0; i < iov_cnt; i++) { pdu[i].iov_len = iov[i].iov_len; - pdu[i].iov_base = g_memdup(iov[i].iov_base, iov[i].iov_len); + pdu[i].iov_base = util_memdup(iov[i].iov_base, iov[i].iov_len); } req = g_new0(struct avctp_browsing_req, 1); |