Replace NULL with nullptr
Also fixed some lines that were too long, and a few other minor
details.
Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
diff --git a/runtime/thread_linux.cc b/runtime/thread_linux.cc
index 0284364..0526f49 100644
--- a/runtime/thread_linux.cc
+++ b/runtime/thread_linux.cc
@@ -50,26 +50,26 @@
ss.ss_sp = new uint8_t[kHostAltSigStackSize];
ss.ss_size = kHostAltSigStackSize;
ss.ss_flags = 0;
- CHECK(ss.ss_sp != NULL);
- SigAltStack(&ss, NULL);
+ CHECK(ss.ss_sp != nullptr);
+ SigAltStack(&ss, nullptr);
// Double-check that it worked.
- ss.ss_sp = NULL;
- SigAltStack(NULL, &ss);
+ ss.ss_sp = nullptr;
+ SigAltStack(nullptr, &ss);
VLOG(threads) << "Alternate signal stack is " << PrettySize(ss.ss_size) << " at " << ss.ss_sp;
}
void Thread::TearDownAlternateSignalStack() {
// Get the pointer so we can free the memory.
stack_t ss;
- SigAltStack(NULL, &ss);
+ SigAltStack(nullptr, &ss);
uint8_t* allocated_signal_stack = reinterpret_cast<uint8_t*>(ss.ss_sp);
// Tell the kernel to stop using it.
- ss.ss_sp = NULL;
+ ss.ss_sp = nullptr;
ss.ss_flags = SS_DISABLE;
ss.ss_size = kHostAltSigStackSize; // Avoid ENOMEM failure with Mac OS' buggy libc.
- SigAltStack(&ss, NULL);
+ SigAltStack(&ss, nullptr);
// Free it.
delete[] allocated_signal_stack;