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:	Wed, 3 Sep 2014 07:52:52 +0000
From:	Yuval Mintz <Yuval.Mintz@...gic.com>
To:	YOSHIFUJI Hideaki/吉藤英明 
	<hideaki.yoshifuji@...aclelinux.com>,
	Ian Morris <ipm@...rality.org.uk>,
	netdev <netdev@...r.kernel.org>
CC:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
Subject: RE: [PATCH net-next 4/4] ipv6: coding style - cleanse bracing

> Hi,
>
> Ian Morris wrote:
> > Tidy up braces in a few places (mainly if statements):
> > * remove unnecessary braces
> > * add braces for single line statements where part of an "else" where
> > the other branch has braces
>
> Hmm, I am not for this change.
>
> If "if" (or "else") statement occupies multiple lines, I want to see braces even if it
> contains a single statement.
> On the other hand, especiallly if the statement occupiles only one line (and the
> logic do not require those braces), no braces.
>
> e.g. 1
>     if (cond)
>             statement();
>     else {
>             statement2(argument,
>                        argument2);
>     }

I was under the impression the coding style require matching curly braces on all
if and else clauses, e.g., in the previous example I would have expected the `if' to
have curly braces since its else block has them, regardless of whether its
statement-block has more than a single line.

> e.g. 2
>     if (cond) {
>             if (cond2)
>                     statement();
>     } else
>             statement2(argument, argument2);
>
> e.g. 3
>     if (cond) {
>             /* comment */
>             statement();
>     }

________________________________

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ