f-stack/dpdk/devtools/cocci/strlcpy.cocci

9 lines
118 B
Plaintext
Raw Normal View History

2019-06-25 11:12:58 +00:00
@use_strlcpy@
identifier src, dst;
expression size;
@@
(
- snprintf(dst, size, "%s", src)
+ strlcpy(dst, src, size)
)