2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Apply the isc_mem_cget semantic patch

This commit is contained in:
Ondřej Surý
2023-08-23 08:56:31 +02:00
parent a742fde51a
commit 89fcb6f897
46 changed files with 259 additions and 269 deletions

View File

@@ -560,7 +560,7 @@ dns_diff_sort(dns_diff_t *diff, dns_diff_compare_func *compare) {
if (length == 0) {
return (ISC_R_SUCCESS);
}
v = isc_mem_get(diff->mctx, length * sizeof(dns_difftuple_t *));
v = isc_mem_cget(diff->mctx, length, sizeof(dns_difftuple_t *));
for (i = 0; i < length; i++) {
p = ISC_LIST_HEAD(diff->tuples);
v[i] = p;
@@ -571,7 +571,7 @@ dns_diff_sort(dns_diff_t *diff, dns_diff_compare_func *compare) {
for (i = 0; i < length; i++) {
ISC_LIST_APPEND(diff->tuples, v[i], link);
}
isc_mem_put(diff->mctx, v, length * sizeof(dns_difftuple_t *));
isc_mem_cput(diff->mctx, v, length, sizeof(dns_difftuple_t *));
return (ISC_R_SUCCESS);
}