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/gatt.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/gatt.c')
-rw-r--r-- | android/gatt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/android/gatt.c b/android/gatt.c index a8a0c488b..e8ba5aabb 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -1338,7 +1338,8 @@ static void discover_primary_cb(uint8_t status, GSList *services, } bt_uuid_to_uuid128(&uuid, &u128); - new_uuid = g_memdup(&u128.value.u128, sizeof(u128.value.u128)); + new_uuid = util_memdup(&u128.value.u128, + sizeof(u128.value.u128)); uuids = g_slist_prepend(uuids, new_uuid); } @@ -6633,7 +6634,7 @@ static uint8_t write_prep_request(const uint8_t *cmd, uint16_t cmd_len, queue_push_tail(dev->pending_requests, data); - data->value = g_memdup(value, vlen); + data->value = util_memdup(value, vlen); data->length = vlen; if (!gatt_db_attribute_write(attrib, offset, value, vlen, cmd[0], |