]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: virstring: Remove virStringListHasString
authorPeter Krempa <pkrempa@redhat.com>
Wed, 3 Feb 2021 17:39:32 +0000 (18:39 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 11 Feb 2021 16:05:33 +0000 (17:05 +0100)
All callers were converted to the glib alternative. Providing our own
just to have NULL tolerance doesn't make sense.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/libvirt_private.syms
src/util/virstring.c
src/util/virstring.h

index afc5e9947f11d010ca6dd1f8b299d82577824e12..5a1f14298912dbbd29ece23cb0c11e6ec392129c 100644 (file)
@@ -3241,7 +3241,6 @@ virStringHasSuffix;
 virStringIsEmpty;
 virStringIsPrintable;
 virStringListFreeCount;
-virStringListHasString;
 virStringListJoin;
 virStringListLength;
 virStringListMerge;
index 516b898223f90be5bdcb743dffd3d63360991544..c0393585e238e7886dfef0642dda33fa5c2bef10 100644 (file)
@@ -221,23 +221,6 @@ virStringListFreeCount(char **strings,
 }
 
 
-bool
-virStringListHasString(const char **strings,
-                       const char *needle)
-{
-    size_t i = 0;
-
-    if (!strings)
-        return false;
-
-    while (strings[i]) {
-        if (STREQ(strings[i++], needle))
-            return true;
-    }
-
-    return false;
-}
-
 /* Like strtol, but produce an "int" result, and check more carefully.
    Return 0 upon success;  return -1 to indicate failure.
    When END_PTR is NULL, the byte after the final valid digit must be NUL.
index 4705b9c141e70819b8c3e5a6f678b04520e48dbe..1a15812307afa6f8b2bf54ea1107e99dda6c19d9 100644 (file)
@@ -43,9 +43,6 @@ int virStringListMerge(char ***dst,
 void virStringListFreeCount(char **strings,
                             size_t count);
 
-bool virStringListHasString(const char **strings,
-                            const char *needle);
-
 int virStrToLong_i(char const *s,
                    char **end_ptr,
                    int base,