qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs/devel: Fix coding style in style.rst
@ 2023-07-10  9:26 Thomas Huth
  2023-07-10  9:32 ` Konstantin Kostiuk
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thomas Huth @ 2023-07-10  9:26 UTC (permalink / raw)
  To: qemu-devel, Daniel P. Berrangé
  Cc: qemu-trivial, Alex Bennée, Markus Armbruster,
	Philippe Mathieu-Daudé, Juan Quintela, Konstantin Kostiuk

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.

Reported-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Fixes: 821f296756 ("docs: document use of automatic cleanup functions in glib")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 docs/devel/style.rst | 9 ++++++---
 1 file 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 = .....
 
-- 
2.39.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-10 10:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-10  9:26 [PATCH] docs/devel: Fix coding style in style.rst Thomas Huth
2023-07-10  9:32 ` Konstantin Kostiuk
2023-07-10  9:49 ` Markus Armbruster
2023-07-10 10:06 ` Philippe Mathieu-Daudé
2023-07-10 10:29 ` Alex Bennée

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).