Commit 21fd1d37 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msvcrt: Fix calloc() prototype.

parent bb590b3f
...@@ -273,7 +273,7 @@ MSVCRT__onexit_t CDECL MSVCRT__onexit(MSVCRT__onexit_t func) ...@@ -273,7 +273,7 @@ MSVCRT__onexit_t CDECL MSVCRT__onexit(MSVCRT__onexit_t func)
{ {
MSVCRT__onexit_t *newtable; MSVCRT__onexit_t *newtable;
TRACE("expanding table\n"); 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) if (!newtable)
{ {
TRACE("failed!\n"); TRACE("failed!\n");
......
...@@ -512,7 +512,7 @@ unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block) ...@@ -512,7 +512,7 @@ unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
last_fd++; last_fd++;
*size = sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * last_fd; *size = sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * last_fd;
*block = MSVCRT_calloc(*size, 1); *block = MSVCRT_calloc(1, *size);
if (!*block) if (!*block)
{ {
*size = 0; *size = 0;
...@@ -660,7 +660,7 @@ static BOOL msvcrt_alloc_buffer(MSVCRT_FILE* file) ...@@ -660,7 +660,7 @@ static BOOL msvcrt_alloc_buffer(MSVCRT_FILE* file)
&& MSVCRT__isatty(file->_file)) && MSVCRT__isatty(file->_file))
return FALSE; return FALSE;
file->_base = MSVCRT_calloc(MSVCRT_INTERNAL_BUFSIZ,1); file->_base = MSVCRT_calloc(1, MSVCRT_INTERNAL_BUFSIZ);
if(file->_base) { if(file->_base) {
file->_bufsiz = MSVCRT_INTERNAL_BUFSIZ; file->_bufsiz = MSVCRT_INTERNAL_BUFSIZ;
file->_flag |= MSVCRT__IOMYBUF; file->_flag |= MSVCRT__IOMYBUF;
......
...@@ -392,9 +392,9 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offs ...@@ -392,9 +392,9 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offs
/********************************************************************* /*********************************************************************
* calloc (MSVCRT.@) * 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) ...@@ -2262,8 +2262,8 @@ static void test_write_flush_size(FILE *file, int bufsize)
fpos_t pos, pos2; fpos_t pos, pos2;
fd = fileno(file); fd = fileno(file);
inbuffer = calloc(bufsize + 1, 1); inbuffer = calloc(1, bufsize + 1);
outbuffer = calloc(bufsize + 1, 1); outbuffer = calloc(1, bufsize + 1);
_snprintf(outbuffer, bufsize + 1, "0,1,2,3,4,5,6,7,8,9"); _snprintf(outbuffer, bufsize + 1, "0,1,2,3,4,5,6,7,8,9");
for (size = bufsize + 1; size >= bufsize - 1; size--) { for (size = bufsize + 1; size >= bufsize - 1; size--) {
......
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