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