mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-07 05:57:30 +03:00
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:
parent
caa71d3028
commit
9f5d6d098a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user