diff options
-rw-r--r-- | src/wrapper/wrapper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wrapper/wrapper.c b/src/wrapper/wrapper.c index d78f1a4..b3249b6 100644 --- a/src/wrapper/wrapper.c +++ b/src/wrapper/wrapper.c @@ -21,12 +21,12 @@ verbose_log(const char *fmt, ...) static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); - fprintf(stderr, "%lu: ", pthread_self()); va_list ap; va_start(ap, fmt); - vfprintf(stderr, fmt, ap); + char buf[1024]; + vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); - fputc('\n', stderr); + fprintf(stderr, "%lu: %s\n", pthread_self(), buf); pthread_mutex_unlock(&mutex); } |