[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #if
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #if |
Date: |
Mon, 18 Jul 2011 13:19:50 +0100 |
On Sun, Jul 17, 2011 at 9:48 AM, Blue Swirl <address@hidden> wrote:
> 789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else,
> fix also #if.
>
> Signed-off-by: Blue Swirl <address@hidden>
> ---
> scripts/checkpatch.pl | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 075b614..9bc867f 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2537,6 +2537,7 @@ sub process {
> }
> if (!defined $suppress_ifbraces{$linenr - 1} &&
> $line =~ /\b(if|while|for|else)\b/ &&
> + $line !~ /\#\s*if/ &&
> $line !~ /\#\s*else/) {
> my $allowed = 0;
>
> --
> 1.6.2.4
Reviewed-by: Stefan Hajnoczi <address@hidden>