mirror of
https://github.com/systemd/systemd
synced 2024-07-24 11:44:41 +00:00
docs: add coding style example
Add example of how to structure else-blocks following a multiline block.
This commit is contained in:
parent
b905f3bbba
commit
4dbad977ff
|
@ -69,6 +69,14 @@ layout: default
|
|||
```
|
||||
|
||||
- Do not write `foo ()`, write `foo()`.
|
||||
- `else` blocks should generally start on the same line as the closing `}`:
|
||||
```c
|
||||
if (foobar) {
|
||||
find();
|
||||
waldo();
|
||||
} else
|
||||
dont_find_waldo();
|
||||
```
|
||||
|
||||
## Code Organization and Semantics
|
||||
|
||||
|
|
Loading…
Reference in a new issue