This is a uncommon and trivial operation, so having an utility function
for it is pointless.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/libvirt_private.syms | 1 -
src/util/virstring.c | 18 ------------------
src/util/virstring.h | 3 ---
3 files changed, 22 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 86380d0853..d215665ee0 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -3241,7 +3241,6 @@ virStringHasSuffix;
virStringIsEmpty;
virStringIsPrintable;
virStringListFreeCount;
-virStringListGetFirstWithPrefix;
virStringListHasString;
virStringListJoin;
virStringListLength;
diff --git a/src/util/virstring.c b/src/util/virstring.c
index bf861d4847..516b898223 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -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.
diff --git a/src/util/virstring.h b/src/util/virstring.h
index 00c669b43b..4705b9c141 100644
--- a/src/util/virstring.h
+++ b/src/util/virstring.h
@@ -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,
--
2.29.2