From: Alberto Garcia <berto@igalia.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
"Max Reitz" <mreitz@redhat.com>
Subject: Re: [PATCH] qcow2: Use a GString in report_unsupported_feature()
Date: Wed, 15 Jan 2020 14:49:28 +0100 [thread overview]
Message-ID: <w51h80wvnh3.fsf@maestria.local.igalia.com> (raw)
In-Reply-To: <87blr5nc6z.fsf@linaro.org>
On Tue 14 Jan 2020 07:08:04 PM CET, Alex Bennée wrote:
> g_autoptr(GString) features = g_string_sized_new(60);
>
> will save you the clean-up later.
Ok, will send v2 now.
>> + if (features->len > 0) {
>> + g_string_append(features, ", ");
>> + }
>> + g_string_append_printf(features, "%.46s",
>> table->name);
>
> We have a number of cases of this sort of idiom in the code base. I
> wonder if it calls for a utility function:
>
> qemu_append_with_sep(features, ", ", "%.46s", table->name)
Maybe it's worth checking. I can have a look once this is applied (there
was another similar one in the queue already).
Berto
prev parent reply other threads:[~2020-01-15 13:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 14:54 [PATCH] qcow2: Use a GString in report_unsupported_feature() Alberto Garcia
2020-01-14 18:08 ` Alex Bennée
2020-01-14 18:43 ` Philippe Mathieu-Daudé
2020-01-14 21:35 ` Alex Bennée
2020-01-15 14:23 ` Philippe Mathieu-Daudé
2020-01-15 13:49 ` Alberto Garcia [this message]
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=w51h80wvnh3.fsf@maestria.local.igalia.com \
--to=berto@igalia.com \
--cc=alex.bennee@linaro.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).