[PATCH] make sure count is used uninitialzied
Marcus Meissner
marcus at jet.franken.de
Thu Feb 8 14:09:44 CST 2007
Hi,
spotted by coverity, which says "count
may be used uninitialized".
Fixed by using the same condition on both tests.
Ciao, Marcus
---
dlls/winmm/winmm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c
index 7499f60..d9615e4 100644
--- a/dlls/winmm/winmm.c
+++ b/dlls/winmm/winmm.c
@@ -1708,9 +1708,9 @@ static BOOL MMSYSTEM_MidiStream_PostMess
if (PostThreadMessageA(lpMidiStrm->dwThreadID, msg, pmt1, pmt2)) {
DWORD count;
- if (pFnReleaseThunkLock) pFnReleaseThunkLock(&count);
+ if (pFnReleaseThunkLock && pFnRestoreThunkLock) pFnReleaseThunkLock(&count);
WaitForSingleObject(lpMidiStrm->hEvent, INFINITE);
- if (pFnRestoreThunkLock) pFnRestoreThunkLock(count);
+ if (pFnReleaseThunkLock && pFnRestoreThunkLock) pFnRestoreThunkLock(count);
} else {
WARN("bad PostThreadMessageA\n");
return FALSE;
--
1.4.3.4
More information about the wine-patches
mailing list