parse: don't format the string twice
authorRob Clark <rob@ti.com>
Wed, 7 Oct 2009 20:23:08 +0000 (23:23 +0300)
committerStefan Kost <ensonic@users.sf.net>
Wed, 7 Oct 2009 20:23:08 +0000 (23:23 +0300)
We were formatting the string once and then passing the string as a format
string to the log functions.

gst/parse/grammar.y

index f48b337..db28887 100644 (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