lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1403295536.4076.8.camel@joe-AO725>
Date:	Fri, 20 Jun 2014 13:18:56 -0700
From:	Joe Perches <joe@...ches.com>
To:	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Andy Whitcroft <apw@...onical.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch.pl: Also suggest 'else if' when if follows
 brace

On Fri, 2014-06-20 at 22:04 +0200, Rasmus Villemoes wrote:
> This might help a kernel hacker think twice before blindly adding a
> newline.

Sure, fine by me.

> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 010b18e..e1924eb 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3601,7 +3601,7 @@ sub process {
>  # if should not continue a brace
>  		if ($line =~ /}\s*if\b/) {
>  			ERROR("TRAILING_STATEMENTS",
> -			      "trailing statements should be on next line\n" .
> +			      "trailing statements should be on next line (or did you mean 'else if'?)\n" .
>  				$herecurr);
>  		}
>  # case and default should not have general statements after them



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ