From 4a5ba4c732394b06b33351685b02c65f1f5b4a64 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 2 Oct 2007 13:31:59 +0200 Subject: [PATCH] kernel32: Improve tracing in GlobalAlloc. --- dlls/kernel32/heap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c index c3598aff2e1..587499ae6dc 100644 --- a/dlls/kernel32/heap.c +++ b/dlls/kernel32/heap.c @@ -356,11 +356,10 @@ HGLOBAL WINAPI GlobalAlloc( else hpflags=0; - TRACE("() flags=%04x\n", flags ); - if((flags & GMEM_MOVEABLE)==0) /* POINTER */ { palloc=HeapAlloc(GetProcessHeap(), hpflags, size); + TRACE( "(flags=%04x) returning %p\n", flags, palloc ); return (HGLOBAL) palloc; } else /* HANDLE */ @@ -399,7 +398,10 @@ HGLOBAL WINAPI GlobalAlloc( } RtlUnlockHeap(GetProcessHeap()); - return pintern ? INTERN_TO_HANDLE(pintern) : 0; + if (!pintern) return 0; + TRACE( "(flags=%04x) returning handle %p pointer %p\n", + flags, INTERN_TO_HANDLE(pintern), pintern->Pointer ); + return INTERN_TO_HANDLE(pintern); } }