mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-25 13:50:09 +03:00
virLogParseOutput: Replace virStringSplitCount by g_strsplit
Unfortunately here we do need the count of elements. Use g_strv_length to calculate it so that virStringSplitCount can be removed later. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@ -1470,7 +1470,8 @@ virLogParseOutput(const char *src)
|
|||||||
/* split our format prio:destination:additional_data to tokens and parse
|
/* split our format prio:destination:additional_data to tokens and parse
|
||||||
* them individually
|
* them individually
|
||||||
*/
|
*/
|
||||||
if (!(tokens = virStringSplitCount(src, ":", 0, &count)) || count < 2) {
|
if (!(tokens = g_strsplit(src, ":", 0)) ||
|
||||||
|
(count = g_strv_length(tokens)) < 2) {
|
||||||
virReportError(VIR_ERR_INVALID_ARG,
|
virReportError(VIR_ERR_INVALID_ARG,
|
||||||
_("Malformed format for output '%s'"), src);
|
_("Malformed format for output '%s'"), src);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user