Module: wine Branch: refs/heads/master Commit: cb6983fb304756d914565c8cb7d86a68be8f7c2c URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=cb6983fb304756d914565c8c...
Author: Mike McCormack mike@codeweavers.com Date: Mon Jan 16 20:41:09 2006 +0100
wineboot: Use WIN32_LEAN_AND_MEAN. Use HeapAlloc/HeapFree instead of malloc/free.
---
programs/wineboot/wineboot.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index f56143a..4e9270e 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -51,6 +51,8 @@ * processed (requires translations from Unicode to Ansi). */
+#define WIN32_LEAN_AND_MEAN + #include <stdio.h> #include <windows.h> #include <wine/debug.h> @@ -240,7 +242,7 @@ static BOOL pendingRename(void) goto end; }
- buffer=malloc( dataLength ); + buffer=HeapAlloc( GetProcessHeap(),0,dataLength ); if( buffer==NULL ) { WINE_ERR("Couldn't allocate %lu bytes for the value\n", dataLength ); @@ -325,7 +327,7 @@ static BOOL pendingRename(void)
end: if( buffer!=NULL ) - free(buffer); + HeapFree(GetProcessHeap(), 0, buffer);
if( hSession!=NULL ) RegCloseKey( hSession ); @@ -460,7 +462,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, goto end; }
- if( (szCmdLine=malloc(nMaxCmdLine))==NULL ) + if( (szCmdLine=HeapAlloc(GetProcessHeap(),0,nMaxCmdLine))==NULL ) { WINE_ERR("Couldn't allocate memory for the commands to be executed\n");
@@ -468,7 +470,7 @@ static BOOL ProcessRunKeys( HKEY hkRoot, goto end; }
- if( (szValue=malloc((++nMaxValue)*sizeof(*szValue)))==NULL ) + if( (szValue=HeapAlloc(GetProcessHeap(),0,(++nMaxValue)*sizeof(*szValue)))==NULL ) { WINE_ERR("Couldn't allocate memory for the value names\n");