summary refs log tree commit diff stats
path: root/docs/devel
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2023-07-10 11:26:38 +0200
committerThomas Huth <thuth@redhat.com>2023-07-10 15:34:57 +0200
commit7233bd122370155abfd75a42c86a9087ca5a8dbf (patch)
treefc223759c003f20d499a4f68bb8ebe952628202c /docs/devel
parente02f56e3dee8dffc194e74275439f1975552da78 (diff)
downloadfocaccia-qemu-7233bd122370155abfd75a42c86a9087ca5a8dbf.tar.gz
focaccia-qemu-7233bd122370155abfd75a42c86a9087ca5a8dbf.zip
docs/devel: Fix coding style in style.rst
As defined earlier in this file, the opening curly brace of
functions should be placed on a separate line. So we should
do it in the examples here, too.

Fixes: 821f296756 ("docs: document use of automatic cleanup functions in glib")
Reported-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <20230710092638.161625-1-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'docs/devel')
-rw-r--r--docs/devel/style.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/devel/style.rst b/docs/devel/style.rst
index aa5e083ff8..3cfcdeb9cd 100644
--- a/docs/devel/style.rst
+++ b/docs/devel/style.rst
@@ -567,7 +567,8 @@ For example, instead of
 
 .. code-block:: c
 
-    int somefunc(void) {
+    int somefunc(void)
+    {
         int ret = -1;
         char *foo = g_strdup_printf("foo%", "wibble");
         GList *bar = .....
@@ -588,7 +589,8 @@ Using g_autofree/g_autoptr enables the code to be written as:
 
 .. code-block:: c
 
-    int somefunc(void) {
+    int somefunc(void)
+    {
         g_autofree char *foo = g_strdup_printf("foo%", "wibble");
         g_autoptr (GList) bar = .....
 
@@ -613,7 +615,8 @@ are still some caveats to beware of
 
 .. code-block:: c
 
-    char *somefunc(void) {
+    char *somefunc(void)
+    {
         g_autofree char *foo = g_strdup_printf("foo%", "wibble");
         g_autoptr (GList) bar = .....