From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-trivial@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Juan Quintela" <quintela@redhat.com>,
"Konstantin Kostiuk" <kkostiuk@redhat.com>
Subject: [PATCH] docs/devel: Fix coding style in style.rst
Date: Mon, 10 Jul 2023 11:26:38 +0200 [thread overview]
Message-ID: <20230710092638.161625-1-thuth@redhat.com> (raw)
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
next reply other threads:[~2023-07-10 9:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 9:26 Thomas Huth [this message]
2023-07-10 9:32 ` [PATCH] docs/devel: Fix coding style in style.rst 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230710092638.161625-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).