[PATCH] removed superflous NULL ptr check
Marcus Meissner
marcus at jet.franken.de
Tue Oct 2 04:32:37 CDT 2007
Coverity spotted a superflous NULL ptr check.
The pointer is dereferenced before the check
and the caller already assures the pointer to be
non-NULL.
Ciao, Marcus
---
dlls/pdh/pdh_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/pdh/pdh_main.c b/dlls/pdh/pdh_main.c
index c5117bf..49d0a33 100644
--- a/dlls/pdh/pdh_main.c
+++ b/dlls/pdh/pdh_main.c
@@ -482,7 +482,7 @@ static DWORD CALLBACK collect_query_thre
if (WaitForSingleObject( stop, interval ) != WAIT_TIMEOUT) ExitThread( 0 );
EnterCriticalSection( &pdh_handle_cs );
- if (!query || query->magic != PDH_MAGIC_QUERY)
+ if (query->magic != PDH_MAGIC_QUERY)
{
LeaveCriticalSection( &pdh_handle_cs );
ExitThread( PDH_INVALID_HANDLE );
--
1.4.3.4
More information about the wine-patches
mailing list