mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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:
parent
56cedfcf38
commit
4661ea3578
@ -3241,7 +3241,6 @@ virStringHasSuffix;
|
|||||||
virStringIsEmpty;
|
virStringIsEmpty;
|
||||||
virStringIsPrintable;
|
virStringIsPrintable;
|
||||||
virStringListFreeCount;
|
virStringListFreeCount;
|
||||||
virStringListHasString;
|
|
||||||
virStringListJoin;
|
virStringListJoin;
|
||||||
virStringListLength;
|
virStringListLength;
|
||||||
virStringListMerge;
|
virStringListMerge;
|
||||||
|
@ -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.
|
/* Like strtol, but produce an "int" result, and check more carefully.
|
||||||
Return 0 upon success; return -1 to indicate failure.
|
Return 0 upon success; return -1 to indicate failure.
|
||||||
When END_PTR is NULL, the byte after the final valid digit must be NUL.
|
When END_PTR is NULL, the byte after the final valid digit must be NUL.
|
||||||
|
@ -43,9 +43,6 @@ int virStringListMerge(char ***dst,
|
|||||||
void virStringListFreeCount(char **strings,
|
void virStringListFreeCount(char **strings,
|
||||||
size_t count);
|
size_t count);
|
||||||
|
|
||||||
bool virStringListHasString(const char **strings,
|
|
||||||
const char *needle);
|
|
||||||
|
|
||||||
int virStrToLong_i(char const *s,
|
int virStrToLong_i(char const *s,
|
||||||
char **end_ptr,
|
char **end_ptr,
|
||||||
int base,
|
int base,
|
||||||
|
Loading…
Reference in New Issue
Block a user