[PATCH 15/39] virLogParseFilter: Replace virStringSplitCount by g_strsplit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We don't really need the count.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virlog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index 57eb0de538..8a4cfbfdc2 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -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;
-- 
2.29.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux