libxl/CODING_STYLE: Clarify the singular statement in a conditional statement explanation.
PATCH 1/1 libxl/CODING_STYLE: Clarify the singular statement in a conditional statement explanation.
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).
---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
---
--- tools/libxl/CODING_STYLE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/CODING_STYLE +1 -1
@@ -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
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 9 lines · Konrad Rzeszutek Wilk
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.
Quoted 7 lines
Changing the 'apart from' with 'except' makes it more obvious (I hope).
Signed-off-by Konrad Rzeszutek Wilk <[email protected]>---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
Not a native speaker, so I will defer this to Ian.
Quoted 21 lines
---
--- tools/libxl/CODING_STYLE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/libxl/CODING_STYLE +1
-1@@ -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 theSignature · 1 line
2.5.0
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Konrad Rzeszutek Wilk writes ("[PATCH] libxl/CODING_STYLE: Clarify the singular statement in a conditional statement explanation."):
Quoted 3 lines
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:
And queued, thanks.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel