mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
util: virstring: Remove unused 'virStringListMerge'
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6c49c2ee9f
commit
9d34136a52
@ -3298,7 +3298,6 @@ virStringHasControlChars;
|
||||
virStringHasSuffix;
|
||||
virStringIsEmpty;
|
||||
virStringIsPrintable;
|
||||
virStringListMerge;
|
||||
virStringMatch;
|
||||
virStringMatchesNameSuffix;
|
||||
virStringParsePort;
|
||||
|
@ -35,41 +35,6 @@
|
||||
|
||||
VIR_LOG_INIT("util.string");
|
||||
|
||||
/**
|
||||
* virStringListMerge:
|
||||
* @dst: a NULL-terminated array of strings to expand
|
||||
* @src: a NULL-terminated array of strings
|
||||
*
|
||||
* Merges @src into @dst. Upon successful return from this
|
||||
* function, @dst is resized to $(dst + src) elements and @src is
|
||||
* freed.
|
||||
*
|
||||
* Returns 0 on success, -1 otherwise.
|
||||
*/
|
||||
int
|
||||
virStringListMerge(char ***dst,
|
||||
char ***src)
|
||||
{
|
||||
size_t dst_len, src_len, i;
|
||||
|
||||
if (!src || !*src)
|
||||
return 0;
|
||||
|
||||
dst_len = g_strv_length(*dst);
|
||||
src_len = g_strv_length(*src);
|
||||
|
||||
VIR_REALLOC_N(*dst, dst_len + src_len + 1);
|
||||
|
||||
for (i = 0; i <= src_len; i++)
|
||||
(*dst)[i + dst_len] = (*src)[i];
|
||||
|
||||
/* Don't call g_strfreev() as it would free strings in
|
||||
* @src. */
|
||||
VIR_FREE(*src);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* 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.
|
||||
|
@ -22,9 +22,6 @@
|
||||
|
||||
#define VIR_INT64_STR_BUFLEN 21
|
||||
|
||||
int virStringListMerge(char ***dst,
|
||||
char ***src);
|
||||
|
||||
int virStrToLong_i(char const *s,
|
||||
char **end_ptr,
|
||||
int base,
|
||||
|
Loading…
x
Reference in New Issue
Block a user