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

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

@@ -441,8 +441,7 @@ mem_create(isc_mem_t **ctxp, unsigned int debugging, unsigned int flags) {
if ((ctx->debugging & ISC_MEM_DEBUGRECORD) != 0) {
unsigned int i;
ctx->debuglist =
mallocx((DEBUG_TABLE_COUNT * sizeof(debuglist_t)), 0);
ctx->debuglist = calloc(DEBUG_TABLE_COUNT, sizeof(debuglist_t));
INSIST(ctx->debuglist != NULL);
for (i = 0; i < DEBUG_TABLE_COUNT; i++) {
@@ -489,8 +488,7 @@ destroy(isc_mem_t *ctx) {
}
}
sdallocx(ctx->debuglist,
(DEBUG_TABLE_COUNT * sizeof(debuglist_t)), 0);
free(ctx->debuglist);
}
#endif /* if ISC_MEM_TRACKLINES */