mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-18 18:18:00 -05:00
Add spatch to replace memcpy usage with memmove
This commit is contained in:
parent
5efc32ebae
commit
7615e86fae
1 changed files with 14 additions and 0 deletions
14
cocci/memcpy.spatch
Normal file
14
cocci/memcpy.spatch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
@has_string_h@
|
||||
@@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@depends on has_string_h@
|
||||
|
||||
expression D;
|
||||
expression S;
|
||||
expression N;
|
||||
@@
|
||||
|
||||
- memcpy(D, S, N);
|
||||
+ memmove(D, S, N);
|
||||
Loading…
Reference in a new issue