msvcrt: Fix calloc() prototype.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bb590b3f9f
commit
21fd1d3729
|
@ -273,7 +273,7 @@ MSVCRT__onexit_t CDECL MSVCRT__onexit(MSVCRT__onexit_t func)
|
|||
{
|
||||
MSVCRT__onexit_t *newtable;
|
||||
TRACE("expanding table\n");
|
||||
newtable = MSVCRT_calloc(sizeof(void *),MSVCRT_atexit_table_size + 32);
|
||||
newtable = MSVCRT_calloc(MSVCRT_atexit_table_size + 32, sizeof(void *));
|
||||
if (!newtable)
|
||||
{
|
||||
TRACE("failed!\n");
|
||||
|
|
|
@ -512,7 +512,7 @@ unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
|
|||
last_fd++;
|
||||
|
||||
*size = sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * last_fd;
|
||||
*block = MSVCRT_calloc(*size, 1);
|
||||
*block = MSVCRT_calloc(1, *size);
|
||||
if (!*block)
|
||||
{
|
||||
*size = 0;
|
||||
|
@ -660,7 +660,7 @@ static BOOL msvcrt_alloc_buffer(MSVCRT_FILE* file)
|
|||
&& MSVCRT__isatty(file->_file))
|
||||
return FALSE;
|
||||
|
||||
file->_base = MSVCRT_calloc(MSVCRT_INTERNAL_BUFSIZ,1);
|
||||
file->_base = MSVCRT_calloc(1, MSVCRT_INTERNAL_BUFSIZ);
|
||||
if(file->_base) {
|
||||
file->_bufsiz = MSVCRT_INTERNAL_BUFSIZ;
|
||||
file->_flag |= MSVCRT__IOMYBUF;
|
||||
|
|
|
@ -392,9 +392,9 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offs
|
|||
/*********************************************************************
|
||||
* calloc (MSVCRT.@)
|
||||
*/
|
||||
void* CDECL MSVCRT_calloc(MSVCRT_size_t size, MSVCRT_size_t count)
|
||||
void* CDECL MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size)
|
||||
{
|
||||
return msvcrt_heap_alloc(HEAP_ZERO_MEMORY, size*count);
|
||||
return msvcrt_heap_alloc(HEAP_ZERO_MEMORY, count*size);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
@ -2262,8 +2262,8 @@ static void test_write_flush_size(FILE *file, int bufsize)
|
|||
fpos_t pos, pos2;
|
||||
|
||||
fd = fileno(file);
|
||||
inbuffer = calloc(bufsize + 1, 1);
|
||||
outbuffer = calloc(bufsize + 1, 1);
|
||||
inbuffer = calloc(1, bufsize + 1);
|
||||
outbuffer = calloc(1, bufsize + 1);
|
||||
_snprintf(outbuffer, bufsize + 1, "0,1,2,3,4,5,6,7,8,9");
|
||||
|
||||
for (size = bufsize + 1; size >= bufsize - 1; size--) {
|
||||
|
|
Loading…
Reference in New Issue