Skip to content

Commit 7ab646e

Browse files
committed
policies/coding-style.md: move "defined" to other function-like things
While "defined" is indeed a unary preprocessor operator, it is treated as a function sintactically in the codebase, similar to sizeof and friends. Signed-off-by: Eugene Syromiatnikov <[email protected]>
1 parent e543ab3 commit 7ab646e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

policies/coding-style.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ a function or keyword. Use a space after most keywords:
167167
if, switch, case, for, do, while, return
168168
```
169169

170-
Do not use a space after `sizeof`, `typeof`, `alignof`, or `__attribute__`.
171-
They look somewhat like functions and should have parentheses
172-
in OpenSSL, although they are not required by the language. For `sizeof`,
173-
use a variable when at all possible, to ensure that type changes are
174-
properly reflected:
170+
Do not use a space after `defined`, `sizeof`, `typeof`, `alignof`,
171+
or `__attribute__`. They look somewhat like functions and should have
172+
parentheses in OpenSSL, although they are not required by the language.
173+
For `sizeof`, use a variable when at all possible, to ensure that type changes
174+
are properly reflected:
175175

176176
```c
177177
SOMETYPE *p = OPENSSL_malloc(sizeof(*p) * num_of_elements);
@@ -206,7 +206,7 @@ and after semicolons in `for` statements, but not in `for (;;)`.
206206
Do not put a space after unary operators:
207207

208208
```c
209-
& * + - ~ ! defined
209+
& * + - ~ !
210210
```
211211

212212
Do not put a space before the postfix increment and decrement unary

0 commit comments

Comments
 (0)