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

Add and use semantic patch to replace isc_mem_get/allocate+memset

Add new semantic patch to replace the straightfoward uses of:

  ptr = isc_mem_{get,allocate}(..., size);
  memset(ptr, 0, size);

with the new API call:

  ptr = isc_mem_{get,allocate}x(..., size, ISC_MEM_ZERO);
This commit is contained in:
Ondřej Surý
2022-06-03 12:36:24 +02:00
parent dbf5672f32
commit c1d26b53eb
40 changed files with 124 additions and 172 deletions

View File

@@ -990,9 +990,7 @@ sync_channellist(isc_logconfig_t *lcfg) {
bytes = lctx->category_count * sizeof(ISC_LIST(isc_logchannellist_t));
lists = isc_mem_get(lctx->mctx, bytes);
memset(lists, 0, bytes);
lists = isc_mem_getx(lctx->mctx, bytes, ISC_MEM_ZERO);
if (lcfg->channellist_count != 0) {
bytes = lcfg->channellist_count *