mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-26 10:58:53 +02:00
alloca and vasprintf go away
This commit is contained in:
11
gstrfuncs.c
11
gstrfuncs.c
@@ -108,15 +108,6 @@ g_strdup_vprintf (const gchar *format,
|
||||
va_list args1)
|
||||
{
|
||||
gchar *buffer;
|
||||
|
||||
#if (HAVE_VASPRINTF) && !(ENABLE_MEM_CHECK)
|
||||
/* if memory checking is disabled, that means we can call g_free() on
|
||||
* memory obtained via malloc(). This allows us to use the
|
||||
* glibc vasprintf() call where available.
|
||||
*/
|
||||
vasprintf (&buffer, format, args1);
|
||||
#else
|
||||
|
||||
va_list args2;
|
||||
|
||||
G_VA_COPY (args2, args1);
|
||||
@@ -126,8 +117,6 @@ g_strdup_vprintf (const gchar *format,
|
||||
vsprintf (buffer, format, args2);
|
||||
va_end (args2);
|
||||
|
||||
#endif /* (HAVE_VASPRINTF) && !(ENABLE_MEM_CHECK) */
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user