Do extra manual isc_mem_cget() conversions

Some of the cases weren't caught by the coccinelle and there were some
places where cget+memmove() could get converted to simple creget().
This commit is contained in:
Ondřej Surý
2023-08-23 10:00:12 +02:00
parent 89fcb6f897
commit 55c29b8d83
22 changed files with 95 additions and 191 deletions

View File

@@ -138,9 +138,8 @@ dns_requestmgr_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr,
isc_mem_attach(mctx, &requestmgr->mctx);
uint32_t nloops = isc_loopmgr_nloops(requestmgr->loopmgr);
requestmgr->requests = isc_mem_getx(
requestmgr->mctx, nloops * sizeof(requestmgr->requests[0]),
ISC_MEM_ZERO);
requestmgr->requests = isc_mem_cget(requestmgr->mctx, nloops,
sizeof(requestmgr->requests[0]));
for (size_t i = 0; i < nloops; i++) {
ISC_LIST_INIT(requestmgr->requests[i]);