mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 11:21:51 +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;
|
int written, resize = sizeof(buf), retval;
|
||||||
va_list valist;
|
va_list valist;
|
||||||
|
|
||||||
|
va_start( valist, fmt );
|
||||||
|
|
||||||
while ((written = _vsnprintf( mem, resize, fmt, valist )) == -1 ||
|
while ((written = _vsnprintf( mem, resize, fmt, valist )) == -1 ||
|
||||||
written > resize)
|
written > resize)
|
||||||
{
|
{
|
||||||
|
@ -26,6 +28,8 @@ _cprintf(const char *fmt, ...)
|
||||||
free (mem);
|
free (mem);
|
||||||
if (!(mem = (char *)malloc(resize)))
|
if (!(mem = (char *)malloc(resize)))
|
||||||
return EOF;
|
return EOF;
|
||||||
|
|
||||||
|
va_end ( valist );
|
||||||
va_start( valist, fmt );
|
va_start( valist, fmt );
|
||||||
}
|
}
|
||||||
va_end ( valist );
|
va_end ( valist );
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "include/reactos/msvctarget.h"
|
#include <msvctarget.h>
|
||||||
|
|
||||||
@ stdcall CcCanIWrite(ptr long long long)
|
@ stdcall CcCanIWrite(ptr long long long)
|
||||||
@ stdcall CcCopyRead(ptr ptr long long ptr ptr)
|
@ stdcall CcCopyRead(ptr ptr long long ptr ptr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue