Module: wine Branch: master Commit: d3cb5c24a5ebbc7dcfb181a56f0f55cf3d1a1c30 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d3cb5c24a5ebbc7dcfb181a56f...
Author: Sebastian Lackner sebastian@fds-team.de Date: Mon Aug 29 14:07:22 2016 +0200
shell32: Remove __SHFreeAndNil macro.
Signed-off-by: Sebastian Lackner sebastian@fds-team.de Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/shell32/shell32_main.h | 6 ------ dlls/shell32/shfldr_fs.c | 10 ++++++++-- 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index 4b8c7cb..8cd1318 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -156,12 +156,6 @@ static inline BOOL SHELL_OsIsUnicode(void) return !(GetVersion() & 0x80000000); }
-#define __SHFreeAndNil(ptr) \ - {\ - SHFree(*ptr); \ - *ptr = NULL; \ - }; - static inline WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source) { int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0); diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index d8bcb4c..2f49eb2 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -1482,9 +1482,15 @@ IFSFldr_PersistFolder3_InitializeEx (IPersistFolder3 * iface, pdump (ppfti->pidlTargetFolder);
if (This->pidlRoot) - __SHFreeAndNil (&This->pidlRoot); /* free the old */ + { + SHFree(This->pidlRoot); + This->pidlRoot = NULL; + } if (This->sPathTarget) - __SHFreeAndNil (&This->sPathTarget); + { + SHFree(This->sPathTarget); + This->sPathTarget = NULL; + }
/* * Root path and pidl