mirror of
https://github.com/reactos/reactos.git
synced 2026-07-05 19:44:26 +08: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user