From 6ff7821b69d463dfbe9f8f662e34330880cebe3b Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Fri, 13 May 2005 10:27:19 +0000 Subject: [PATCH] fix comment, declare parameter type as constant svn path=/trunk/; revision=15259 --- reactos/subsys/system/winefile/winefile.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/reactos/subsys/system/winefile/winefile.c b/reactos/subsys/system/winefile/winefile.c index 25bfbeabe02..22765552240 100644 --- a/reactos/subsys/system/winefile/winefile.c +++ b/reactos/subsys/system/winefile/winefile.c @@ -188,13 +188,13 @@ int swprintf(wchar_t* buffer, const wchar_t* fmt, ...) } -#define LOCAL_ALLOC(s) HeapAlloc(GetProcessHeap(), 0, s) -#define LOCAL_FREE(p) HeapFree(GetProcessHeap(), 0, p) +#define TMP_ALLOC(s) HeapAlloc(GetProcessHeap(), 0, s) +#define TMP_FREE(p) HeapFree(GetProcessHeap(), 0, p) #else -#define LOCAL_ALLOC(s) alloca(s) -#define LOCAL_FREE(p) +#define TMP_ALLOC(s) alloca(s) +#define TMP_FREE(p) #endif @@ -837,7 +837,7 @@ HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl) } -static Entry* find_entry_shell(Entry* dir, LPITEMIDLIST pidl) +static Entry* find_entry_shell(Entry* dir, LPCITEMIDLIST pidl) { Entry* entry; @@ -874,7 +874,7 @@ static Entry* read_tree_shell(Root* root, LPITEMIDLIST pidl, SORT_ORDER sortOrde if (!pidl->mkid.cb) break; - /* copy first element of item idlist -> could be replaced by SHBindToParent() */ + /* copy first element of item idlist */ next_pidl = (*Globals.iMalloc->lpVtbl->Alloc)(Globals.iMalloc, pidl->mkid.cb+sizeof(USHORT)); memcpy(next_pidl, pidl, pidl->mkid.cb); ((LPITEMIDLIST)((LPBYTE)next_pidl+pidl->mkid.cb))->mkid.cb = 0; @@ -1208,7 +1208,7 @@ static void SortDirectory(Entry* dir, SORT_ORDER sortOrder) len++; if (len) { - array = (Entry**) LOCAL_ALLOC(len*sizeof(Entry*)); + array = (Entry**) TMP_ALLOC(len*sizeof(Entry*)); p = array; for(entry=dir->down; entry; entry=entry->next) @@ -1224,7 +1224,7 @@ static void SortDirectory(Entry* dir, SORT_ORDER sortOrder) (*p)->next = 0; - LOCAL_FREE(array); + TMP_FREE(array); } }