virLogParseFilter: Replace virStringSplitCount by g_strsplit

We don't really need the count.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-03-22 17:59:14 +01:00
parent caa71d3028
commit 9f5d6d098a

View File

@ -1556,7 +1556,6 @@ virLogParseOutput(const char *src)
virLogFilterPtr
virLogParseFilter(const char *src)
{
size_t count = 0;
virLogPriority prio;
g_auto(GStrv) tokens = NULL;
char *match = NULL;
@ -1564,7 +1563,8 @@ virLogParseFilter(const char *src)
VIR_DEBUG("filter=%s", src);
/* split our format prio:match_str to tokens and parse them individually */
if (!(tokens = virStringSplitCount(src, ":", 0, &count)) || count != 2) {
if (!(tokens = g_strsplit(src, ":", 0)) ||
!tokens[0] || !tokens[1]) {
virReportError(VIR_ERR_INVALID_ARG,
_("Malformed format for filter '%s'"), src);
return NULL;