[PATCH 7/7] util: Tweak virStringMatchesNameSuffix() some more

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

 



We can use STRNEQ() instead of STRNEQLEN() since we're only
interested in the trailing part of the string.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/util/virstring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virstring.c b/src/util/virstring.c
index ba36562f85..f23daca0bd 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -1300,7 +1300,7 @@ virStringMatchesNameSuffix(const char *file,
     if (STRNEQLEN(file, name, namelen))
         return false;
 
-    if (STRNEQLEN(file + namelen, suffix, suffixlen))
+    if (STRNEQ(file + namelen, suffix))
         return false;
 
     return true;
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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