gst_trace_text_flush (GstTrace * trace)
{
int i;
- const int strsize = 20 + 1 + 10 + 1 + 10 + 1 + 112 + 1 + 1;
- char str[strsize];
+#define STRSIZE (20 + 1 + 10 + 1 + 10 + 1 + 112 + 1 + 1)
+ char str[STRSIZE];
if (!trace) {
trace = _gst_trace_default;
}
for (i = 0; i < trace->bufoffset; i++) {
- snprintf (str, strsize, "%20" G_GINT64_FORMAT " %10d %10d %s\n",
+ snprintf (str, STRSIZE, "%20" G_GINT64_FORMAT " %10d %10d %s\n",
trace->buf[i].timestamp,
trace->buf[i].sequence, trace->buf[i].data, trace->buf[i].message);
write (trace->fd, str, strlen (str));
}
trace->bufoffset = 0;
+#undef STRSIZE
}
void