Commit 223ea131 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

schedsvc: Simplify and standardize the heap_xxx() declarations.

parent 97fa31ee
...@@ -23,22 +23,19 @@ ...@@ -23,22 +23,19 @@
void schedsvc_auto_start(void) DECLSPEC_HIDDEN; void schedsvc_auto_start(void) DECLSPEC_HIDDEN;
static void *heap_alloc_zero(SIZE_T size) __WINE_ALLOC_SIZE(1); static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(SIZE_T size)
static inline void *heap_alloc_zero(SIZE_T size)
{ {
void *ptr = MIDL_user_allocate(size); return MIDL_user_allocate(size);
if (ptr) memset(ptr, 0, size);
return ptr;
} }
static void *heap_alloc(SIZE_T size) __WINE_ALLOC_SIZE(1); static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(SIZE_T size)
static inline void *heap_alloc(SIZE_T size)
{ {
return MIDL_user_allocate(size); void *ptr = MIDL_user_allocate(size);
if (ptr) memset(ptr, 0, size);
return ptr;
} }
static void *heap_realloc(void *ptr, SIZE_T size) __WINE_ALLOC_SIZE(2); static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *ptr, SIZE_T size)
static inline void *heap_realloc(void *ptr, SIZE_T size)
{ {
return HeapReAlloc(GetProcessHeap(), 0, ptr, size); return HeapReAlloc(GetProcessHeap(), 0, ptr, 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