virStringListGetFirstWithPrefix: Remove unused helper

This is a uncommon and trivial operation, so having an utility function
for it is pointless.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2021-02-05 14:34:31 +01:00
parent 7cc3418915
commit e6c9c44e9a
3 changed files with 0 additions and 22 deletions

View File

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

View File

@ -238,24 +238,6 @@ virStringListHasString(const char **strings,
return false;
}
char *
virStringListGetFirstWithPrefix(char **strings,
const char *prefix)
{
size_t i = 0;
if (!strings)
return NULL;
while (strings[i]) {
if (STRPREFIX(strings[i], prefix))
return strings[i] + strlen(prefix);
i++;
}
return NULL;
}
/* 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

@ -45,9 +45,6 @@ void virStringListFreeCount(char **strings,
bool virStringListHasString(const char **strings,
const char *needle);
char *virStringListGetFirstWithPrefix(char **strings,
const char *prefix)
ATTRIBUTE_NONNULL(2);
int virStrToLong_i(char const *s,
char **end_ptr,