Simplify isc_mem_create() to always use defaults and never fail
Previously, the isc_mem_create() and isc_mem_createx() functions took `max_size` and `target_size` as first two arguments. Those values were never used in the BIND 9 code. The refactoring removes those arguments and let BIND 9 always use the default values. Previously, the isc_mem_create() and isc_mem_createx() functions could have failed because of failed memory allocation. As this was no longer true and the functions have always returned ISC_R_SUCCESS, the have been refactored to return void.
This commit is contained in:
@@ -60,8 +60,7 @@ int ctx_init(void) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (isc_mem_create(0, 0, &ctx.mem) != ISC_R_SUCCESS)
|
||||
goto done;
|
||||
isc_mem_create(&ctx.mem);
|
||||
|
||||
if (isc_log_create(ctx.mem, &ctx.log, &ctx.logcfg) != ISC_R_SUCCESS)
|
||||
goto done;
|
||||
@@ -337,6 +336,3 @@ struct DNSConf {
|
||||
%readonly
|
||||
dns_c_ctx_t *confctx;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user