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

13 lines
169 B
Plaintext
Raw Normal View History

2020-06-18 16:55:50 +00:00
@include@
@@
#include <rte_string_fns.h>
@use_strlcpy depends on include@
expression src, dst, size;
@@
(
- snprintf(dst, size, "%s", src)
+ strlcpy(dst, src, size)
)