Francois Gouget : pdh: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.

Alexandre Julliard julliard at winehq.org
Wed Feb 22 15:42:03 CST 2017


Module: wine
Branch: master
Commit: 88c4d3361cf179f39b936a7dd61f7d268d45b02e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=88c4d3361cf179f39b936a7dd61f7d268d45b02e

Author: Francois Gouget <fgouget at free.fr>
Date:   Wed Feb 22 11:25:56 2017 +0100

pdh: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.

And standardize their formatting and type names.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/pdh/pdh_main.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c
index 39f9f25..0d7c5ef 100644
--- a/dlls/pdh/pdh_main.c
+++ b/dlls/pdh/pdh_main.c
@@ -47,19 +47,19 @@ static CRITICAL_SECTION_DEBUG pdh_handle_cs_debug =
 };
 static CRITICAL_SECTION pdh_handle_cs = { &pdh_handle_cs_debug, -1, 0, 0, 0, 0 };
 
-static inline void *heap_alloc( SIZE_T size )
+static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
 {
-    return HeapAlloc( GetProcessHeap(), 0, size );
+    return HeapAlloc(GetProcessHeap(), 0, size);
 }
 
-static inline void *heap_alloc_zero( SIZE_T size )
+static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size)
 {
-    return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size );
+    return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
 }
 
-static inline void heap_free( LPVOID mem )
+static inline BOOL heap_free(void *mem)
 {
-    HeapFree( GetProcessHeap(), 0, mem );
+    return HeapFree(GetProcessHeap(), 0, mem);
 }
 
 static inline WCHAR *pdh_strdup( const WCHAR *src )




More information about the wine-cvs mailing list