xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xenproject.org,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH] libxl/CODING_STYLE: Clarify the singular statement in a conditional statement explanation.
Date: Fri, 1 Apr 2016 16:25:14 +0100	[thread overview]
Message-ID: <20160401152514.GM27636@citrix.com> (raw)
In-Reply-To: <1459523637-30104-1-git-send-email-konrad.wilk@oracle.com>

On Fri, Apr 01, 2016 at 11:13:57AM -0400, Konrad Rzeszutek Wilk wrote:
> It takes a bit of thinking to parse the original statement. It looks
> like it is missing an ',' - right after the 'braced' to make it
> obvious that:
> 
> if (X)
>    return XYZ;
> 
> is OK, while multiple conditionals require braces.
> 
> Changing the 'apart from' with 'except' makes it more obvious
> (I hope).
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> CC: Ian Jackson <ian.jackson@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>

Not a native speaker, so I will defer this to Ian.

> ---
> ---
>  tools/libxl/CODING_STYLE | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/libxl/CODING_STYLE b/tools/libxl/CODING_STYLE
> index 522d1c9..01ee25b 100644
> --- a/tools/libxl/CODING_STYLE
> +++ b/tools/libxl/CODING_STYLE
> @@ -294,7 +294,7 @@ Libxenlight coding style is super simple.  Avoid tricky expressions.
>  
>  5. Block structure
>  
> -Every indented statement is braced apart from blocks that contain just
> +Every indented statement is braced, except blocks that contain just
>  one statement.
>  The opening brace is on the line that contains the control flow
>  statement that introduces the new block; the closing brace is on the
> -- 
> 2.5.0
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-04-01 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 15:13 [PATCH] libxl/CODING_STYLE: Clarify the singular statement in a conditional statement explanation Konrad Rzeszutek Wilk
2016-04-01 15:25 ` Wei Liu [this message]
2016-04-06 13:53 ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160401152514.GM27636@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).