diff options
Diffstat (limited to 'src/spdk/dpdk/devtools/cocci/strlcpy.cocci')
-rw-r--r-- | src/spdk/dpdk/devtools/cocci/strlcpy.cocci | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/spdk/dpdk/devtools/cocci/strlcpy.cocci b/src/spdk/dpdk/devtools/cocci/strlcpy.cocci new file mode 100644 index 000000000..6f6beb697 --- /dev/null +++ b/src/spdk/dpdk/devtools/cocci/strlcpy.cocci @@ -0,0 +1,7 @@ +@use_strlcpy@ +expression src, dst, size; +@@ +( +- snprintf(dst, size, "%s", src) ++ strlcpy(dst, src, size) +) |