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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 30 Jan 2021 10:53:32 -0800
From:   Joe Perches <joe@...ches.com>
To:     Jiri Kosina <trivial@...nel.org>, linux-kernel@...r.kernel.org
Cc:     Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org
Subject: Re: [PATCH 01/29] coding-style.rst: Avoid comma statements

On Mon, 2020-08-24 at 21:55 -0700, Joe Perches wrote:
> Commas are not how statements are terminated.
> Always use semicolons and braces if necessary.

ping?

> 
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---
>  Documentation/process/coding-style.rst | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst
> index 98227226c4e5..a1e061149e0d 100644
> --- a/Documentation/process/coding-style.rst
> +++ b/Documentation/process/coding-style.rst
> @@ -69,9 +69,26 @@ something to hide:
>  	if (condition) do_this;
>  	  do_something_everytime;
>  
> 
> +Don't use commas to avoid using braces:
> +
> +.. code-block:: c
> +
> +	if (condition)
> +		do_this(), do_that();
> +
> +Always uses braces for multiple statements:
> +
> +.. code-block:: c
> +
> +	if (condition) {
> +		do_this();
> +		do_that();
> +	}
> +
>  Don't put multiple assignments on a single line either.  Kernel coding style
>  is super simple.  Avoid tricky expressions.
>  
> 
> +
>  Outside of comments, documentation and except in Kconfig, spaces are never
>  used for indentation, and the above example is deliberately broken.
>  
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ