[libvirt] [PATCH 3/8] virstring: Introduce virStringListAdd
Michal Privoznik
mprivozn at redhat.com
Wed Nov 30 12:27:23 UTC 2016
On 30.11.2016 11:22, Pino Toscano wrote:
> On Wednesday, 30 November 2016 10:59:30 CET Michal Privoznik wrote:
>> +char **
>> +virStringListAdd(const char **strings,
>> + const char *item)
>> +{
>> + char **ret = NULL;
>> + size_t i;
>> +
>> + for (i = 0; strings && strings[i]; i++)
>> + ;
>
> virStringListLength, I guess.
Yeah, that could work too. For some reason I wanted to avoid another
function call, but I guess compiler will optimize that anyway.
Michal
More information about the libvir-list
mailing list