Commit f9934598 authored by Kevin Funk's avatar Kevin Funk

Use nullptr everywhere

Differential Revision: https://phabricator.kde.org/D3987
parent 395c1da4
......@@ -138,7 +138,7 @@ bool ShmPool::Private::createPool()
qCDebug(KWAYLAND_CLIENT) << "Could not set size for Shm pool file";
return false;
}
poolData = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, tmpFile->handle(), 0);
poolData = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, tmpFile->handle(), 0);
pool.setup(wl_shm_create_pool(shm, tmpFile->handle(), size));
if (!poolData || !pool) {
......@@ -156,7 +156,7 @@ bool ShmPool::Private::resizePool(int32_t newSize)
}
wl_shm_pool_resize(pool, newSize);
munmap(poolData, size);
poolData = mmap(NULL, newSize, PROT_READ | PROT_WRITE, MAP_SHARED, tmpFile->handle(), 0);
poolData = mmap(nullptr, newSize, PROT_READ | PROT_WRITE, MAP_SHARED, tmpFile->handle(), 0);
size = newSize;
if (!poolData) {
qCDebug(KWAYLAND_CLIENT) << "Resizing Shm pool failed";
......
......@@ -57,7 +57,7 @@ static int startXServer()
close(pipeFds[0]);
char fdbuf[16];
sprintf(fdbuf, "%d", pipeFds[1]);
execlp(process.constData(), process.constData(), "-displayfd", fdbuf, "-rootless", (char *)0);
execlp(process.constData(), process.constData(), "-displayfd", fdbuf, "-rootless", (char *)nullptr);
close(pipeFds[1]);
exit(20);
}
......
......@@ -48,7 +48,7 @@ static int startXServer()
close(pipeFds[0]);
char fdbuf[16];
sprintf(fdbuf, "%d", pipeFds[1]);
execlp(process.constData(), process.constData(), "-displayfd", fdbuf, (char *)0);
execlp(process.constData(), process.constData(), "-displayfd", fdbuf, (char *)nullptr);
close(pipeFds[1]);
exit(20);
}
......@@ -112,7 +112,7 @@ int main(int argc, char **argv)
eventDispatcher->processEvents(QEventLoop::WaitForMoreEvents);
FD_ZERO(&rfds);
FD_SET(pipe, &rfds);
} while (select(pipe + 1, &rfds, NULL, NULL, &tv) == 0);
} while (select(pipe + 1, &rfds, nullptr, nullptr, &tv) == 0);
// now Xwayland is ready and we can read the pipe to get the display
readDisplayFromPipe(pipe);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment