summaryrefslogtreecommitdiffstats
path: root/docs/CODING_STYLE.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:19:03 +0000
commit2b689e3af421bdd35ccd34cdc733d4d8a40843b3 (patch)
treedc0754b353914d026743560b8fa8977dc407fe99 /docs/CODING_STYLE.md
parentReleasing progress-linux version 256.1-2~progress7.99u1. (diff)
downloadsystemd-2b689e3af421bdd35ccd34cdc733d4d8a40843b3.tar.xz
systemd-2b689e3af421bdd35ccd34cdc733d4d8a40843b3.zip
Merging upstream version 256.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/CODING_STYLE.md')
-rw-r--r--docs/CODING_STYLE.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md
index 309436a..82ed0a5 100644
--- a/docs/CODING_STYLE.md
+++ b/docs/CODING_STYLE.md
@@ -54,6 +54,18 @@ SPDX-License-Identifier: LGPL-2.1-or-later
}
```
+- Function return types should be seen/written as whole, i.e. write this:
+
+ ```c
+ const char* foo(const char *input);
+ ```
+
+ instead of this:
+
+ ```c
+ const char *foo(const char *input);
+ ```
+
- Single-line `if` blocks should not be enclosed in `{}`. Write this:
```c
@@ -182,7 +194,7 @@ SPDX-License-Identifier: LGPL-2.1-or-later
```c
static int foobar_frobnicate(
- Foobar* object, /* the associated mutable object */
+ Foobar *object, /* the associated mutable object */
const char *input, /* immutable input parameter */
char **ret_frobnicated, /* return parameter on success */
unsigned *reterr_line, /* return parameter on failure */