Re: [libvirt] [PATCH v2 11/20] virlog: Introduce virLogParseOutputs

2016-10-06 Thread Erik Skultety
>> + >> +VIR_DEBUG("outputs=%s", src); >> + >> +if (!(strings = virStringSplit(src, " ", 0))) > > You could use the Count version and then... > >> +goto cleanup; >> + >> +for (i = 0; strings[i]; i++) { > > ...rather than strings[i], it's < count Well, this way we spared one

Re: [libvirt] [PATCH v2 11/20] virlog: Introduce virLogParseOutputs

2016-09-21 Thread John Ferlan
On 08/18/2016 07:47 AM, Erik Skultety wrote: > Another abstraction added on the top of parsing a single logging output. This > method takes and parses the whole set of outputs, adding each single output > that has already been parsed into a caller-provided array. If the > user-supplied > string

[libvirt] [PATCH v2 11/20] virlog: Introduce virLogParseOutputs

2016-08-18 Thread Erik Skultety
Another abstraction added on the top of parsing a single logging output. This method takes and parses the whole set of outputs, adding each single output that has already been parsed into a caller-provided array. If the user-supplied string contained duplicate outputs, only the last occurrence is