Re: [PATCH] qcow2: Use a GString in report_unsupported_feature()

2020-01-15 Thread Philippe Mathieu-Daudé
On 1/14/20 10:35 PM, Alex Bennée wrote: Philippe Mathieu-Daudé writes: On 1/14/20 7:08 PM, Alex Bennée wrote: Alberto Garcia writes: 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 featur

Re: [PATCH] qcow2: Use a GString in report_unsupported_feature()

2020-01-15 Thread Alberto Garcia
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, ", "); >> +

Re: [PATCH] qcow2: Use a GString in report_unsupported_feature()

2020-01-14 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 1/14/20 7:08 PM, Alex Bennée wrote: >> Alberto Garcia writes: >> >>> 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. >>> >>> Sugg

Re: [PATCH] qcow2: Use a GString in report_unsupported_feature()

2020-01-14 Thread Philippe Mathieu-Daudé
On 1/14/20 7:08 PM, Alex Bennée wrote: Alberto Garcia writes: 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. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Alberto Garcia -

Re: [PATCH] qcow2: Use a GString in report_unsupported_feature()

2020-01-14 Thread Alex Bennée
Alberto Garcia writes: > 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. > > Suggested-by: Philippe Mathieu-Daudé > Signed-off-by: Alberto Garcia > --- > block/qcow2.c | 24

[PATCH] qcow2: Use a GString in report_unsupported_feature()

2020-01-14 Thread Alberto Garcia
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. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Alberto Garcia --- block/qcow2.c | 24 1 file changed, 12