diff options
Diffstat (limited to 'src/mumblemanager.cpp')
-rw-r--r-- | src/mumblemanager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mumblemanager.cpp b/src/mumblemanager.cpp index 2b3f15afa..fd95a67f9 100644 --- a/src/mumblemanager.cpp +++ b/src/mumblemanager.cpp @@ -86,7 +86,7 @@ void MumbleManager::init() #ifdef WIN32 HANDLE hMapObject = OpenFileMappingW(FILE_MAP_ALL_ACCESS, FALSE, L"MumbleLink"); - if (hMapObject == NULL) + if (!hMapObject) { logger->log1("MumbleManager::init can't open MumbleLink"); return; @@ -95,10 +95,10 @@ void MumbleManager::init() mLinkedMem = (LinkedMem *) MapViewOfFile(hMapObject, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(LinkedMem)); - if (mLinkedMem == NULL) + if (!mLinkedMem) { CloseHandle(hMapObject); - hMapObject = NULL; + hMapObject = nullptr; logger->log1("MumbleManager::init can't map MumbleLink"); return; } @@ -116,12 +116,12 @@ void MumbleManager::init() return; } - mLinkedMem = static_cast<LinkedMem *>(mmap(NULL, sizeof(struct LinkedMem), + mLinkedMem = static_cast<LinkedMem *>(mmap(nullptr, sizeof(struct LinkedMem), PROT_READ | PROT_WRITE, MAP_SHARED, shmfd, 0)); if (mLinkedMem == reinterpret_cast<void *>(-1)) { - mLinkedMem = NULL; + mLinkedMem = nullptr; logger->log1("MumbleManager::init can't map MumbleLink"); return; } |