mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
util: virstring: Remove the virStringSplitCount wrapper funcion
Callers which need the count of elements now count it in place. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a95794dbdb
commit
0a6f02de70
@ -3264,7 +3264,6 @@ virStringReplace;
|
||||
virStringSearch;
|
||||
virStringSortCompare;
|
||||
virStringSortRevCompare;
|
||||
virStringSplitCount;
|
||||
virStringStripControlChars;
|
||||
virStringStripIPv6Brackets;
|
||||
virStringStripSuffix;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user