2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Enable auto-reallocation for all isc_buffer_allocate() buffers

When isc_buffer_t buffer is created with isc_buffer_allocate() assume
that we want it to always auto-reallocate instead of having an extra
call to enable auto-reallocation.
This commit is contained in:
Ondřej Surý
2022-12-15 22:27:12 +01:00
parent 135ec7a0f0
commit 6bd2b34180
6 changed files with 30 additions and 57 deletions

View File

@@ -1548,7 +1548,6 @@ catz_process_apl(dns_catz_zone_t *zone, isc_buffer_t **aclbp,
return (result);
}
isc_buffer_allocate(zone->catzs->mctx, &aclb, 16);
isc_buffer_setautorealloc(aclb, true);
for (result = dns_rdata_apl_first(&rdata_apl); result == ISC_R_SUCCESS;
result = dns_rdata_apl_next(&rdata_apl))
{
@@ -1940,7 +1939,6 @@ dns_catz_generate_zonecfg(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
*/
isc_buffer_allocate(zone->catzs->mctx, &buffer, ISC_BUFFER_INCR);
isc_buffer_setautorealloc(buffer, true);
isc_buffer_putstr(buffer, "zone \"");
dns_name_totext(&entry->name, true, buffer);
isc_buffer_putstr(buffer, "\" { type secondary; primaries");