util: virstring: Remove virStringListHasString

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>
This commit is contained in:
Peter Krempa 2021-02-03 18:39:32 +01:00
parent 56cedfcf38
commit 4661ea3578
3 changed files with 0 additions and 21 deletions

View File

@ -3241,7 +3241,6 @@ virStringHasSuffix;
virStringIsEmpty;
virStringIsPrintable;
virStringListFreeCount;
virStringListHasString;
virStringListJoin;
virStringListLength;
virStringListMerge;

View 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.

View 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,