From d54b4a731fc0c0a95503b80239bc6b671e252704 Mon Sep 17 00:00:00 2001 From: robocop Date: Fri, 18 Feb 2011 04:30:45 +0000 Subject: [PATCH] Simplification. --- src/jrd/isc_sync.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/jrd/isc_sync.cpp b/src/jrd/isc_sync.cpp index ba36385aa6..b7caadcf1d 100644 --- a/src/jrd/isc_sync.cpp +++ b/src/jrd/isc_sync.cpp @@ -2924,8 +2924,7 @@ static DWORD enterFastMutex(FAST_MUTEX* lpMutex, DWORD dwMilliseconds) unlockSharedSection(lpSect); // TODO actual timeout can be of any length - const DWORD tm = (dwMilliseconds == INFINITE) ? 5000 : - ((dwMilliseconds > 5000) ? 5000 : dwMilliseconds); + const DWORD tm = (dwMilliseconds == INFINITE || dwMilliseconds > 5000) ? 5000 : dwMilliseconds; const DWORD dwResult = WaitForSingleObject(lpMutex->hEvent, tm); InterlockedDecrement(FIX_TYPE(&lpSect->lThreadsWaiting));