Module: wine Branch: master Commit: 9fb58434cbfd8619ae828921b1e36f324a5e7cc1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9fb58434cbfd8619ae828921b1...
Author: Markus Amsler markus.amsler@oribi.org Date: Sun Oct 22 04:51:23 2006 +0200
msvcrt: Speed up new operator.
---
dlls/msvcrt/heap.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 12c1c6e..0158435 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -49,8 +49,9 @@ void* CDECL MSVCRT_operator_new(unsigned { void *retval = HeapAlloc(GetProcessHeap(), 0, size); TRACE("(%ld) returning %p\n", size, retval); + if(retval) return retval; LOCK_HEAP; - if(!retval && MSVCRT_new_handler) + if(MSVCRT_new_handler) (*MSVCRT_new_handler)(size); UNLOCK_HEAP; return retval;