[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] qcow2: Use a GString in report_unsupported_feature()
From: |
Alberto Garcia |
Subject: |
Re: [PATCH v2] qcow2: Use a GString in report_unsupported_feature() |
Date: |
Thu, 16 Jan 2020 13:27:15 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Thu 16 Jan 2020 01:19:34 PM CET, Max Reitz wrote:
> On 15.01.20 14:56, Alberto Garcia wrote:
>> This is a bit more efficient than having to allocate and free memory
>> for each item.
>>
>> The default size (60) is enough for all the existing incompatible
>> features or the "Unknown incompatible feature" message.
>
> That doesn’t make sense to me. The existing incompatible features are
> known to qemu, and as such will never be printed here.
I know, it's sort of an arbitrary number, I just chose a default size
that is big enough for the strings we have.
> ((I’d just have created an empty string. Considering this is part of
> the explanation for a fatal error, nobody cares whether this function
> takes a couple of microseconds more. Or maybe a length of 47, so it
> can definitely hold exactly one incompatible feature name.))
That would be fine with me as well, I don't think it matters so much
either way. Feel free to change the default size or remove the
explanation from the commit message if you want.
Berto