summaryrefslogtreecommitdiffstats
path: root/tools/coccinelle/replace-strncpy.cocci
blob: 18ff1314b003bb42e9745b88e21a515228738449 (plain)
1
2
3
4
5
6
7
8
@@
type T;
T[] E;
expression buf, srclen;
@@

- strncpy(E, src, srclen)
+ strlcpy(E, src, sizeof(E))