docs: Fix missing curly braces

Signed-off-by: Hao Liu <hliu@redhat.com>
This commit is contained in:
Hao Liu 2014-12-10 15:25:08 +08:00 committed by Martin Kletzander
parent 9788007892
commit 0d60a03094
2 changed files with 4 additions and 2 deletions

View File

@ -383,8 +383,9 @@ single-'statement' loop: each has only one 'line' in its body.
single_line_stmt(); // {} is optional (not enforced either way) single_line_stmt(); // {} is optional (not enforced either way)
while (expr1 && while (expr1 &&
expr2) // multi-line, at same indentation, {} required expr2) { // multi-line, at same indentation, {} required
single_line_stmt(); single_line_stmt();
}
However, the moment your loop/if/else body extends on to a second line, for However, the moment your loop/if/else body extends on to a second line, for
whatever reason (even if it's just an added comment), then you should add whatever reason (even if it's just an added comment), then you should add

View File

@ -481,8 +481,9 @@
<pre> <pre>
while (expr1 &amp;&amp; while (expr1 &amp;&amp;
expr2) // multi-line, at same indentation, {} required expr2) { // multi-line, at same indentation, {} required
single_line_stmt(); single_line_stmt();
}
</pre> </pre>
<p> <p>