|
|
# Blocks with 1 statement
|
|
|
- The body of an if condition should at preferably have brackets. If the body has just one statement you may leave out the `{}` but in that case put the statement indented on another line. Also only do this if you think it unlikely that you will add more statements to the body later.
|
|
|
|
|
|
**OK:**
|
|
|
```c
|
|
|
if (flags & STMT_BLOCK_RETURN_F)
|
|
|
ret = TCappendAssign (ret, ret_stmt);
|
|
|
|
|
|
if ((flags & STMT_BLOCK_RETURN_F) && !parse_error) {
|
|
|
BLOCK_VARDECS (ret) = vardecl;
|
|
|
}
|
|
|
```
|
|
|
|
|
|
**NOT OK:**
|
|
|
|
|
|
```c
|
|
|
if (flags & STMT_BLOCK_RETURN_F) ret = TCappendAssign (ret, ret_stmt);
|
|
|
``` |
|
|
\ No newline at end of file |