mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 10:53:42 +00:00
modified lib/sdk/crt/conio/cprintf.c
Call va_start before, and va_end after, each call to _vsnprintf modified ntoskrnl/ntoskrnl.pspec We pass all include directories and defines to the pspec preprocessor, so we can omit paths in pspec includes svn path=/trunk/; revision=37196
This commit is contained in:
parent
f08fcecb82
commit
d4e2952aa7
2 changed files with 6 additions and 2 deletions
|
@ -18,6 +18,8 @@ _cprintf(const char *fmt, ...)
|
|||
int written, resize = sizeof(buf), retval;
|
||||
va_list valist;
|
||||
|
||||
va_start( valist, fmt );
|
||||
|
||||
while ((written = _vsnprintf( mem, resize, fmt, valist )) == -1 ||
|
||||
written > resize)
|
||||
{
|
||||
|
@ -26,9 +28,11 @@ _cprintf(const char *fmt, ...)
|
|||
free (mem);
|
||||
if (!(mem = (char *)malloc(resize)))
|
||||
return EOF;
|
||||
|
||||
va_end ( valist );
|
||||
va_start( valist, fmt );
|
||||
}
|
||||
va_end(valist);
|
||||
va_end ( valist );
|
||||
retval = _cputs( mem );
|
||||
if (mem != buf)
|
||||
free (mem);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "include/reactos/msvctarget.h"
|
||||
#include <msvctarget.h>
|
||||
|
||||
@ stdcall CcCanIWrite(ptr long long long)
|
||||
@ stdcall CcCopyRead(ptr ptr long long ptr ptr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue