Author: akhaldi
Date: Sat Sep 3 13:23:43 2016
New Revision: 72544
URL:
http://svn.reactos.org/svn/reactos?rev=72544&view=rev
Log:
[CRT] Apply Wine commit 21fd1d3 by Nikolay Sivov: Fix calloc() prototype. CORE-11866
Modified:
trunk/reactos/sdk/lib/crt/stdio/file.c
trunk/reactos/sdk/lib/crt/stdlib/atexit.c
trunk/reactos/sdk/lib/crt/wine/heap.c
Modified: trunk/reactos/sdk/lib/crt/stdio/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/stdio/file.c?r…
==============================================================================
--- trunk/reactos/sdk/lib/crt/stdio/file.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/crt/stdio/file.c [iso-8859-1] Sat Sep 3 13:23:43 2016
@@ -410,7 +410,7 @@
ioinfo* fdinfo;
*size = sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * fdend;
- *block = calloc(*size, 1);
+ *block = calloc(1, *size);
if (!*block)
{
*size = 0;
@@ -547,7 +547,7 @@
&& _isatty(file->_file))
return FALSE;
- file->_base = calloc(MSVCRT_INTERNAL_BUFSIZ,1);
+ file->_base = calloc(1, MSVCRT_INTERNAL_BUFSIZ);
if(file->_base) {
file->_bufsiz = MSVCRT_INTERNAL_BUFSIZ;
file->_flag |= _IOMYBUF;
Modified: trunk/reactos/sdk/lib/crt/stdlib/atexit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/stdlib/atexit.…
==============================================================================
--- trunk/reactos/sdk/lib/crt/stdlib/atexit.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/crt/stdlib/atexit.c [iso-8859-1] Sat Sep 3 13:23:43 2016
@@ -69,7 +69,7 @@
{
_onexit_t *newtable;
TRACE("expanding table\n");
- newtable = calloc(sizeof(void *),atexit_table_size + 32);
+ newtable = calloc(atexit_table_size + 32, sizeof(void *));
if (!newtable)
{
TRACE("failed!\n");
Modified: trunk/reactos/sdk/lib/crt/wine/heap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/crt/wine/heap.c?re…
==============================================================================
--- trunk/reactos/sdk/lib/crt/wine/heap.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/crt/wine/heap.c [iso-8859-1] Sat Sep 3 13:23:43 2016
@@ -288,9 +288,9 @@
/*********************************************************************
* calloc (MSVCRT.@)
*/
-void* CDECL calloc(size_t size, size_t count)
-{
- return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size * count );
+void* CDECL calloc(size_t count, size_t size)
+{
+ return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, count * size );
}
/*********************************************************************