[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qcow2: Use a GString in report_unsupported_feature()
From: |
Alberto Garcia |
Subject: |
Re: [PATCH] qcow2: Use a GString in report_unsupported_feature() |
Date: |
Wed, 15 Jan 2020 14:49:28 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
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