diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-07 19:34:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-07 19:34:52 +0300 |
commit | 9e83411f7e4147d09af5a5006888dcc187ea0ef8 (patch) | |
tree | c084bdf8afabc6220779645dcb5dbf71af6a151f /src/mumblemanager.cpp | |
parent | bc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff) | |
download | plus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.gz plus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.bz2 plus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.xz plus-9e83411f7e4147d09af5a5006888dcc187ea0ef8.zip |
Fix some warnings under gcc 4.7.
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; } |