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 /src/eir.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 'src/eir.c')
-rw-r--r-- | src/eir.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -53,9 +53,9 @@ void eir_data_free(struct eir_data *eir) eir->services = NULL; g_free(eir->name); eir->name = NULL; - g_free(eir->hash); + free(eir->hash); eir->hash = NULL; - g_free(eir->randomizer); + free(eir->randomizer); eir->randomizer = NULL; g_slist_free_full(eir->msd_list, g_free); eir->msd_list = NULL; @@ -323,13 +323,13 @@ void eir_parse(struct eir_data *eir, const uint8_t *eir_data, uint8_t eir_len) case EIR_SSP_HASH: if (data_len < 16) break; - eir->hash = g_memdup(data, 16); + eir->hash = util_memdup(data, 16); break; case EIR_SSP_RANDOMIZER: if (data_len < 16) break; - eir->randomizer = g_memdup(data, 16); + eir->randomizer = util_memdup(data, 16); break; case EIR_DEVICE_ID: |