mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-05 09:05:40 +00:00
Use designated initializers instead of memset()/MEM_ZERO for structs
In several places, the structures were cleaned with memset(...)) and thus the semantic patch converted the isc_mem_get(...) to isc_mem_getx(..., ISC_MEM_ZERO). Use the designated initializer to initialized the structures instead of zeroing the memory with ISC_MEM_ZERO flag as this better matches the intended purpose.
This commit is contained in:
@@ -338,7 +338,8 @@ plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
|
||||
"module from %s:%lu, %s parameters",
|
||||
cfg_file, cfg_line, parameters != NULL ? "with" : "no");
|
||||
|
||||
inst = isc_mem_getx(mctx, sizeof(*inst), ISC_MEM_ZERO);
|
||||
inst = isc_mem_get(mctx, sizeof(*inst));
|
||||
*inst = (filter_instance_t){ 0 };
|
||||
isc_mem_attach(mctx, &inst->mctx);
|
||||
|
||||
if (parameters != NULL) {
|
||||
|
Reference in New Issue
Block a user