parse: don't format the string twice

We were formatting the string once and then passing the string as a format
string to the log functions.
This commit is contained in:
Rob Clark 2009-10-07 23:23:08 +03:00 committed by Stefan Kost
parent fcc5d783df
commit e025e328fd

View file

@ -181,18 +181,14 @@ SET_ERROR (GError **error, gint type, const char *format, ...)
/* # define YYFPRINTF(a, ...) GST_CAT_DEBUG (GST_CAT_PIPELINE, __VA_ARGS__) */
# define YYFPRINTF(a, ...) \
G_STMT_START { \
gchar *temp = g_strdup_printf (__VA_ARGS__); \
GST_CAT_LOG (GST_CAT_PIPELINE, temp); \
g_free (temp); \
GST_CAT_LOG (GST_CAT_PIPELINE, __VA_ARGS__); \
} G_STMT_END
# elif defined(G_HAVE_GNUC_VARARGS)
# define YYFPRINTF(a, args...) \
G_STMT_START { \
gchar *temp = g_strdup_printf ( args ); \
GST_CAT_LOG (GST_CAT_PIPELINE, temp); \
g_free (temp); \
GST_CAT_LOG (GST_CAT_PIPELINE, args); \
} G_STMT_END
# else