Skip to content
Snippets Groups Projects
Commit 5dbdb2d8 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: prefer strscpy to strlcpy

parent 3a176b94
No related branches found
No related tags found
No related merge requests found
...@@ -6646,6 +6646,12 @@ sub process { ...@@ -6646,6 +6646,12 @@ sub process {
# } # }
# } # }
# strlcpy uses that should likely be strscpy
if ($line =~ /\bstrlcpy\s*\(/) {
WARN("STRLCPY",
"Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw\@mail.gmail.com/\n" . $herecurr);
}
# typecasts on min/max could be min_t/max_t # typecasts on min/max could be min_t/max_t
if ($perl_version_ok && if ($perl_version_ok &&
defined $stat && defined $stat &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment