vk: Use a temporary buffer for formatting in finishme

This is more likely to avoid breaking up the message when racing with
other threads.
This commit is contained in:
Kristian Høgsberg
2015-05-18 09:05:11 -07:00
parent cd7ab6ba4e
commit 69fd473321

View File

@@ -34,12 +34,13 @@ void
__anv_finishme(const char *file, int line, const char *format, ...)
{
va_list ap;
char buffer[256];
va_start(ap, format);
fprintf(stderr, "%s:%d: FINISHME: ", file, line);
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
vsnprintf(buffer, sizeof(buffer), format, ap);
va_end(ap);
fprintf(stderr, "%s:%d: FINISHME: %s\n", file, line, buffer);
}
int