]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coding style: document how to break a function declaration
authorLuca Boccassi <bluca@debian.org>
Thu, 20 Aug 2020 11:11:26 +0000 (12:11 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Aug 2020 11:19:28 +0000 (13:19 +0200)
docs/CODING_STYLE.md

index 119b9a26407d6a282f6b97cac70ec579e7f7032c..11cc6222e358046efaf5c3cbae371d6167973c62 100644 (file)
@@ -25,6 +25,17 @@ layout: default
   note that emacs loads `.dir-locals.el` automatically, but vim needs to be
   configured to load `.vimrc`, see that file for instructions.
 
+- If you break a function declaration over multiple lines, do it like this:
+
+  ```c
+  void some_function(
+                  int foo,
+                  bool bar,
+                  char baz) {
+
+          int a, b, c;
+  ```
+
 - Try to write this:
 
   ```c