From 0d8a75099d8ee3eb94c269c66326c6f63a49ed40 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 15 Oct 2008 22:02:32 -0700 Subject: [PATCH] --- yaml --- r: 114779 b: refs/heads/master c: f16fa28f7b3d95e989fc64c8480e44c1bcf4bac3 h: refs/heads/master i: 114777: 3bac67544f44b69d2888ca363615cfea025ba97a 114775: 724a97e54ed3ad3ea66a5c945f6a6c97f8c698ab v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 13606e83f360..72ad09f2b9c7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8ed22cad9ce16e3d8915ae75544a133c3050d96f +refs/heads/master: f16fa28f7b3d95e989fc64c8480e44c1bcf4bac3 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 4680ccf7760c..c479bdefc779 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1468,6 +1468,12 @@ sub process { while ($cond_ptr != $cond_lines) { $cond_ptr = $cond_lines; + # If we see an #else/#elif then the code + # is not linear. + if ($s =~ /^\s*\#\s*(?:else|elif)/) { + $check = 0; + } + # Ignore: # 1) blank lines, they should be at 0, # 2) preprocessor lines, and