Module: wine Branch: refs/heads/master Commit: 757ee19ca119b3434a6249a00b1c39c0d36fb449 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=757ee19ca119b3434a6249a0...
Author: Michael Stefaniuc mstefani@redhat.de Date: Wed Aug 9 22:34:56 2006 +0200
janitorial: Removed the rest of the redundant NULL checks before HeapFree.
---
dlls/ddraw/main.c | 2 +- dlls/gdi/font.c | 2 +- dlls/setupapi/misc.c | 3 +-- dlls/setupapi/stringtable.c | 16 +++++----------- 4 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index e654dd7..1868ef2 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -313,7 +313,7 @@ err_out: /* Let's hope we never need this ;) */ if(wineD3DDevice) IWineD3DDevice_Release(wineD3DDevice); if(wineD3D) IWineD3D_Release(wineD3D); - if(This) HeapFree(GetProcessHeap(), 0, This); + HeapFree(GetProcessHeap(), 0, This); return hr; }
diff --git a/dlls/gdi/font.c b/dlls/gdi/font.c index 16e7f7b..ec9074d 100644 --- a/dlls/gdi/font.c +++ b/dlls/gdi/font.c @@ -1243,7 +1243,7 @@ BOOL WINAPI GetTextExtentExPointW( HDC h if (lpnFit) *lpnFit = nFit;
- if (dxs && ! alpDx) + if (! alpDx) HeapFree(GetProcessHeap(), 0, dxs);
GDI_ReleaseObj( hdc ); diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index f9b1d86..c29da52 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -767,8 +767,7 @@ DWORD WINAPI TakeOwnershipOfFile(LPCWSTR fail:; dwError = GetLastError();
- if (pOwner != NULL) - MyFree(pOwner); + MyFree(pOwner);
if (hToken != NULL) CloseHandle(hToken); diff --git a/dlls/setupapi/stringtable.c b/dlls/setupapi/stringtable.c index 35d6f40..8fb1964 100644 --- a/dlls/setupapi/stringtable.c +++ b/dlls/setupapi/stringtable.c @@ -172,18 +172,12 @@ StringTableDestroy(HSTRING_TABLE hString { for (i = 0; i < pStringTable->dwMaxSlots; i++) { - if (pStringTable->pSlots[i].pString != NULL) - { - MyFree(pStringTable->pSlots[i].pString); - pStringTable->pSlots[i].pString = NULL; - } + MyFree(pStringTable->pSlots[i].pString); + pStringTable->pSlots[i].pString = NULL;
- if (pStringTable->pSlots[i].pData != NULL) - { - MyFree(pStringTable->pSlots[i].pData); - pStringTable->pSlots[i].pData = NULL; - pStringTable->pSlots[i].dwSize = 0; - } + MyFree(pStringTable->pSlots[i].pData); + pStringTable->pSlots[i].pData = NULL; + pStringTable->pSlots[i].dwSize = 0; }
MyFree(pStringTable->pSlots);