Module: wine Branch: master Commit: 223ea1312be779843dcca7b07cc954720240a219 URL: http://source.winehq.org/git/wine.git/?a=commit;h=223ea1312be779843dcca7b07c... Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Feb 8 17:56:06 2017 +0100 schedsvc: Simplify and standardize the heap_xxx() declarations. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/schedsvc/schedsvc_private.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/dlls/schedsvc/schedsvc_private.h b/dlls/schedsvc/schedsvc_private.h index 4138aa0..3abce07 100644 --- a/dlls/schedsvc/schedsvc_private.h +++ b/dlls/schedsvc/schedsvc_private.h @@ -23,22 +23,19 @@ void schedsvc_auto_start(void) DECLSPEC_HIDDEN; -static void *heap_alloc_zero(SIZE_T size) __WINE_ALLOC_SIZE(1); -static inline void *heap_alloc_zero(SIZE_T size) +static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(SIZE_T size) { - void *ptr = MIDL_user_allocate(size); - if (ptr) memset(ptr, 0, size); - return ptr; + return MIDL_user_allocate(size); } -static void *heap_alloc(SIZE_T size) __WINE_ALLOC_SIZE(1); -static inline void *heap_alloc(SIZE_T size) +static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(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 *heap_realloc(void *ptr, SIZE_T size) +static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *ptr, SIZE_T size) { return HeapReAlloc(GetProcessHeap(), 0, ptr, size); }