Commit 6a5746b8 authored by nextime's avatar nextime

Why format even we don't need to?

parent 9207c880
......@@ -82,16 +82,18 @@ static void pint_debug(const char *msg, ...)
char *str;
int len;
va_start(args, msg);
len = vsnprintf(NULL, 0, msg, args);
if ((str = malloc(len+1)) == NULL)
return;
if(pinthread_debug)
{
va_start(args, msg);
len = vsnprintf(NULL, 0, msg, args);
if ((str = malloc(len+1)) == NULL)
return;
vsnprintf(str, len+1, msg, args);
va_end(args);
vsnprintf(str, len+1, msg, args);
va_end(args);
if(pinthread_debug)
fprintf(stderr, "D:PINTHREAD: %s\n", str);
}
}
static void main_pinthread(int argc, char* argv[], char* envp[])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment