Commit 5dbdb2d8 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: prefer strscpy to strlcpy

parent 3a176b94
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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
		if ($perl_version_ok &&
		    defined $stat &&