From: Markus Armbruster <armbru@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>,
qemu-trivial@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Juan Quintela" <quintela@redhat.com>,
"Konstantin Kostiuk" <kkostiuk@redhat.com>
Subject: Re: [PATCH] docs/devel: Fix coding style in style.rst
Date: Mon, 10 Jul 2023 11:49:49 +0200 [thread overview]
Message-ID: <87mt049juq.fsf@pond.sub.org> (raw)
In-Reply-To: <20230710092638.161625-1-thuth@redhat.com> (Thomas Huth's message of "Mon, 10 Jul 2023 11:26:38 +0200")
Thomas Huth <thuth@redhat.com> writes:
> 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 = .....
Reviewed-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2023-07-10 9:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=87mt049juq.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=alex.bennee@linaro.org \
--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 \
--cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.