[obsolete] checkpatch-prevent-use-of-unitialized-variable.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: checkpatch: prevent use of unitialized variable
has been removed from the -mm tree.  Its filename was
     checkpatch-prevent-use-of-unitialized-variable.patch

This patch was dropped because it is obsolete

------------------------------------------------------
From: Fredrik Gustafsson <iveqy@xxxxxxxxx>
Subject: checkpatch: prevent use of unitialized variable

Run checkpatch.pl -f kernel/fork.c in commit ecf02a607bd801e7 and
checkpatch.pl will try to use an uninitialized variable.  This patch fixes
that.

Signed-off-by: Fredrik Gustafsson <iveqy@xxxxxxxxx>
Cc: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/checkpatch.pl |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff -puN scripts/checkpatch.pl~checkpatch-prevent-use-of-unitialized-variable scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-prevent-use-of-unitialized-variable
+++ a/scripts/checkpatch.pl
@@ -3379,14 +3379,17 @@ sub process {
 
 			my $ms_addr = $2;
 			my $ms_val = $7;
-			my $ms_size = $12;
 
-			if ($ms_size =~ /^(0x|)0$/i) {
-				ERROR("MEMSET",
-				      "memset to 0's uses 0 as the 2nd argument, not the 3rd\n" . "$here\n$stat\n");
-			} elsif ($ms_size =~ /^(0x|)1$/i) {
-				WARN("MEMSET",
-				     "single byte memset is suspicious. Swapped 2nd/3rd argument?\n" . "$here\n$stat\n");
+			if (defined $12) {
+				my $ms_size = $12;
+
+				if ($ms_size =~ /^(0x|)0$/i) {
+					ERROR("MEMSET",
+						  "memset to 0's uses 0 as the 2nd argument, not the 3rd\n" . "$here\n$stat\n");
+				} elsif ($ms_size =~ /^(0x|)1$/i) {
+					WARN("MEMSET",
+						 "single byte memset is suspicious. Swapped 2nd/3rd argument?\n" . "$here\n$stat\n");
+				}
 			}
 		}
 
_

Patches currently in -mm which might be from iveqy@xxxxxxxxx are


--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux