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

Alexandre Julliard julliard at winehq.org
Tue Feb 21 16:56:12 CST 2017


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

Author: Francois Gouget <fgouget at free.fr>
Date:   Sat Feb 18 11:21:55 2017 +0100

ieframe: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.

And standardize their formatting and parameter names.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ieframe/ieframe.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/ieframe/ieframe.h b/dlls/ieframe/ieframe.h
index b586cc9..d1f1c5d 100644
--- a/dlls/ieframe/ieframe.h
+++ b/dlls/ieframe/ieframe.h
@@ -331,19 +331,19 @@ static inline void unlock_module(void) {
     InterlockedDecrement(&module_ref);
 }
 
-static inline void *heap_alloc(size_t len)
+static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size)
 {
-    return HeapAlloc(GetProcessHeap(), 0, len);
+    return HeapAlloc(GetProcessHeap(), 0, size);
 }
 
-static inline void *heap_alloc_zero(size_t len)
+static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size)
 {
-    return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
+    return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
 }
 
-static inline void *heap_realloc(void *mem, size_t len)
+static inline void* __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t size)
 {
-    return HeapReAlloc(GetProcessHeap(), 0, mem, len);
+    return HeapReAlloc(GetProcessHeap(), 0, mem, size);
 }
 
 static inline BOOL heap_free(void *mem)




More information about the wine-cvs mailing list