Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6805c635 authored by Hepson Sanchez's avatar Hepson Sanchez Committed by Elliot Berman
Browse files

Revert "checkpatch: deprecate unbounded string functions."



This reverts commit 1cf34c7e.

Change-Id: I8d2bca015df62224b01b8f841703acd196488204
Signed-off-by: default avatarHepson Sanchez <sanchez@codeaurora.org>
parent 43773c4d
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -5713,26 +5713,6 @@ sub process {
			      $herecurr);
		}

# unbounded string functions are overflow risks
		my %str_fns = (
			"sprintf" => "snprintf",
			"strcpy"  => "strlcpy",
			"strncpy"  => "strlcpy",
			"strcat"  => "strlcat",
			"strncat"  => "strlcat",
			"vsprintf"  => "vsnprintf",
			"strchr" => "strnchr",
			"strstr" => "strnstr",
		);
		foreach my $k (keys %str_fns) {
			if ($line =~ /\b$k\b/) {
				ERROR("UNBOUNDED_STRING_FNS",
				      "Use of $k is deprecated: " .
				      "use $str_fns{$k} instead.\n" .
				      $herecurr);
			}
		}

# warn about #if 0
		if ($line =~ /^.\s*\#\s*if\s+0\b/) {
			WARN("IF_0",