[PATCH] dmloader: pObject NULL checks are not necessary (Coverity)
Marcus Meissner
marcus at jet.franken.de
Thu Dec 10 17:10:02 CST 2009
Hi,
pObject is non-NULL (it is got and used before in the same function
some lines above).
So the checks are superflous and can be removed.
Ciao, Marcus
---
dlls/dmloader/loader.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c
index 17a8eb2..393b6b9 100644
--- a/dlls/dmloader/loader.c
+++ b/dlls/dmloader/loader.c
@@ -333,18 +333,14 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_GetObject (LPDIR
if (!pObjectEntry) {
pObjectEntry = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(WINE_LOADER_ENTRY));
DM_STRUCT_INIT(&pObjectEntry->Desc);
- if (pObject) {
- DMUSIC_CopyDescriptor (&pObjectEntry->Desc, &GotDesc);
- pObjectEntry->pObject = pObject;
- pObjectEntry->bInvalidDefaultDLS = FALSE;
- }
+ DMUSIC_CopyDescriptor (&pObjectEntry->Desc, &GotDesc);
+ pObjectEntry->pObject = pObject;
+ pObjectEntry->bInvalidDefaultDLS = FALSE;
list_add_head (This->pObjects, &pObjectEntry->entry);
} else {
- if (pObject) {
- DMUSIC_CopyDescriptor (&pObjectEntry->Desc, &GotDesc);
- pObjectEntry->pObject = pObject;
- pObjectEntry->bInvalidDefaultDLS = FALSE;
- }
+ DMUSIC_CopyDescriptor (&pObjectEntry->Desc, &GotDesc);
+ pObjectEntry->pObject = pObject;
+ pObjectEntry->bInvalidDefaultDLS = FALSE;
}
TRACE(": filled in cache entry\n");
} else TRACE(": caching disabled\n");
--
1.5.6
More information about the wine-patches
mailing list