project wide nullptr fix

This commit is contained in:
Erik Frojdh
2019-01-16 15:15:29 +01:00
parent 80a1a3d796
commit 49f71ffca7
16 changed files with 411 additions and 119 deletions

View File

@ -103,7 +103,7 @@ void SharedMemory::RemoveSharedMemory() {
void* SharedMemory::MapSharedMemory(size_t sz) {
void* addr = mmap(NULL, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
void* addr = mmap(nullptr, sz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (addr == MAP_FAILED) {
FILE_LOG(logERROR) << "Mapping shared memory " << name << " failed: " << strerror(errno);
close(fd);
@ -120,7 +120,7 @@ std::string SharedMemory::ConstructSharedMemoryName(int multiId, int slsId) {
// using environment path
std::string sEnvPath = "";
char* envpath = getenv(SHM_ENV_NAME);
if (envpath != NULL) {
if (envpath != nullptr) {
sEnvPath.assign(envpath);
sEnvPath.insert(0,"_");
}