Now that function is no longer used, it can be dropped.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
docs/hacking.html.in | 5 -----
src/libvirt_private.syms | 1 -
src/util/virstring.c | 21 ---------------------
src/util/virstring.h | 11 -----------
4 files changed, 38 deletions(-)
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index f442eeb32a..4b6bcaed53 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
@@ -1028,11 +1028,6 @@ BAD:
<dt><code>VIR_STRDUP</code>,
<code>VIR_STRNDUP</code></dt>
<dd>Prefer the GLib APIs <code>g_strdup</code> and
<code>g_strndup</code>.</dd>
- <dt><code>virAsprintf</code>,
<code>virVasprintf</code></dt>
- <dd>The GLib APIs <code>g_strdup_printf</code> /
<code>g_strdup_vprint</code> should be used
- instead. Don't use <code>g_vasprintf</code> unless having the
string length
- returned is unavoidable.</dd>
-
<dt><code>virStrerror</code></dt>
<dd>The GLib <code>g_strerror()</code> function should be used
instead,
which has a simpler calling convention as an added benefit.</dd>
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index e8458e26c7..59a1fdbe79 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -3121,7 +3121,6 @@ virStrToLong_ull;
virStrToLong_ullp;
virStrToLong_ulp;
virTrimSpaces;
-virVasprintfInternal;
# util/virsysinfo.h
diff --git a/src/util/virstring.c b/src/util/virstring.c
index c704ce38f0..f729bf9aa3 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -722,27 +722,6 @@ virDoubleToStr(char **strp, double number)
}
-void
-virVasprintfInternal(char **strp,
- const char *fmt,
- va_list list)
-{
- char *str = NULL;
-
- g_vasprintf(&str, fmt, list);
-
- /* GLib is supposed to abort() on OOM, but a mistake meant
- * it did not. Delete this once our min glib is at 2.64.0
- * which includes the fix:
- *
https://gitlab.gnome.org/GNOME/glib/merge_requests/1145
- */
-#if !GLIB_CHECK_VERSION(2, 64, 0)
- if (!str)
- abort();
-#endif
- *strp = str;
-}
-
/**
* virStrncpy:
*
diff --git a/src/util/virstring.h b/src/util/virstring.h
index ea0774f2c7..081a5ff1aa 100644
--- a/src/util/virstring.h
+++ b/src/util/virstring.h
@@ -133,8 +133,6 @@ int virStrdup(char **dest, const char *src)
int virStrndup(char **dest, const char *src, ssize_t n)
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
-void virVasprintfInternal(char **strp, const char *fmt, va_list list)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_PRINTF(2, 0);
/**
* VIR_STRDUP:
@@ -207,15 +205,6 @@ void virVasprintfInternal(char **strp, const char *fmt, va_list
list)
size_t virStringListLength(const char * const *strings);
-/**
- * virVasprintf
- *
- * Like glibc's vasprintf but aborts on OOM
- *
- * Returns number of bytes printed on success, aborts on OOM
- */
-#define virVasprintf(strp, fmt, list) virVasprintfInternal(strp, fmt, list)
-
int virStringSortCompare(const void *a, const void *b);
int virStringSortRevCompare(const void *a, const void *b);
int virStringToUpper(char **dst, const char *src);
--
2.21.0