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

13 lines
169 B
Plaintext

@include@
@@
#include <rte_string_fns.h>
@use_strlcpy depends on include@
expression src, dst, size;
@@
(
- snprintf(dst, size, "%s", src)
+ strlcpy(dst, src, size)
)