From cd4d63dd9c9f741703f648bbcea686f256dc79a2 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Mon, 20 Mar 2017 23:03:59 -0700 Subject: [PATCH] Small winapi fixes --- src/platform_win.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform_win.cc b/src/platform_win.cc index ab724f30..db99671d 100644 --- a/src/platform_win.cc +++ b/src/platform_win.cc @@ -53,13 +53,13 @@ struct PlatformScopedMutexLockWin : public PlatformScopedMutexLock { PlatformScopedMutexLockWin(HANDLE raw_mutex) : raw_mutex(raw_mutex) { DWORD result = WaitForSingleObject(raw_mutex, INFINITE); - assert(result != WAIT_FAILED); - CheckForError({} /*allow*/); + assert(result == WAIT_OBJECT_0); + CheckForError({ ERROR_NO_MORE_FILES, ERROR_ALREADY_EXISTS } /*allow*/); } ~PlatformScopedMutexLockWin() override { ReleaseMutex(raw_mutex); - CheckForError({} /*allow*/); + CheckForError({ ERROR_NO_MORE_FILES, ERROR_ALREADY_EXISTS } /*allow*/); } };