Add spatch to replace memcpy usage with memmove

This commit is contained in:
Ondřej Surý 2019-07-12 15:27:06 +02:00
parent 5efc32ebae
commit 7615e86fae

14
cocci/memcpy.spatch Normal file
View 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);