From: Ondřej Surý Date: Fri, 12 Jul 2019 13:27:06 +0000 (+0200) Subject: Add spatch to replace memcpy usage with memmove X-Git-Tag: v9.15.3~48^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7615e86fae8b0628378e8008d3bf1937e1cf103c;p=thirdparty%2Fbind9.git Add spatch to replace memcpy usage with memmove --- diff --git a/cocci/memcpy.spatch b/cocci/memcpy.spatch new file mode 100644 index 00000000000..f5e50e7142f --- /dev/null +++ b/cocci/memcpy.spatch @@ -0,0 +1,14 @@ +@has_string_h@ +@@ + +#include + +@depends on has_string_h@ + +expression D; +expression S; +expression N; +@@ + +- memcpy(D, S, N); ++ memmove(D, S, N);