mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-24 02:10:30 -05:00
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);
17 lines
293 B
Text
17 lines
293 B
Text
@@
|
|
expression ptr, ctx, size;
|
|
@@
|
|
|
|
- ptr = isc_mem_get(ctx, size);
|
|
+ ptr = isc_mem_getx(ctx, size, ISC_MEM_ZERO);
|
|
...
|
|
- memset(ptr, 0, size);
|
|
|
|
@@
|
|
expression ptr, ctx, size;
|
|
@@
|
|
|
|
- ptr = isc_mem_allocate(ctx, size);
|
|
+ ptr = isc_mem_allocatex(ctx, size, ISC_MEM_ZERO);
|
|
...
|
|
- memset(ptr, 0, size);
|