Callers which need the count of elements now count it in place. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/libvirt_private.syms | 1 - src/util/virstring.c | 20 -------------------- src/util/virstring.h | 6 ------ 3 files changed, 27 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9208db2056..68cdb92453 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3260,7 +3260,6 @@ virStringReplace; virStringSearch; virStringSortCompare; virStringSortRevCompare; -virStringSplitCount; virStringStripControlChars; virStringStripIPv6Brackets; virStringStripSuffix; diff --git a/src/util/virstring.c b/src/util/virstring.c index 7749eb2db5..a2c07e5c17 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -35,26 +35,6 @@ VIR_LOG_INIT("util.string"); -/** - * virStringSplitCount: - * - * A wrapper for g_strsplit which provides number of elements of the split - * string. - */ -char ** -virStringSplitCount(const char *string, - const char *delim, - size_t max_tokens, - size_t *tokcount) -{ - GStrv ret = g_strsplit(string, delim, max_tokens); - - *tokcount = g_strv_length(ret); - - return ret; -} - - /** * virStringListMerge: * @dst: a NULL-terminated array of strings to expand diff --git a/src/util/virstring.h b/src/util/virstring.h index e688495574..7cc1d8c55f 100644 --- a/src/util/virstring.h +++ b/src/util/virstring.h @@ -22,12 +22,6 @@ #define VIR_INT64_STR_BUFLEN 21 -char **virStringSplitCount(const char *string, - const char *delim, - size_t max_tokens, - size_t *tokcount) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4); - int virStringListMerge(char ***dst, char ***src); -- 2.29.2