diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-04-21 16:50:40 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-04-22 12:44:27 -0700 |
commit | 2cebb24bfc3247d3e9be138a3350106737455918 (patch) | |
tree | d04d27d21b3c7733d784e303f01f873bb99e7770 /runtime/runtime_linux.cc | |
parent | 1f02f1a7b3073b8fef07770a67fbf94afad317f0 (diff) | |
download | art-2cebb24bfc3247d3e9be138a3350106737455918.tar.gz art-2cebb24bfc3247d3e9be138a3350106737455918.tar.bz2 art-2cebb24bfc3247d3e9be138a3350106737455918.zip |
Replace NULL with nullptr
Also fixed some lines that were too long, and a few other minor
details.
Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
Diffstat (limited to 'runtime/runtime_linux.cc')
-rw-r--r-- | runtime/runtime_linux.cc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/runtime/runtime_linux.cc b/runtime/runtime_linux.cc index 35d944f1e6..d65e18e124 100644 --- a/runtime/runtime_linux.cc +++ b/runtime/runtime_linux.cc @@ -321,7 +321,7 @@ void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_contex OsInfo os_info; const char* cmd_line = GetCmdLine(); - if (cmd_line == NULL) { + if (cmd_line == nullptr) { cmd_line = "<unset>"; // Because no-one called InitLogging. } pid_t tid = GetTid(); @@ -353,9 +353,10 @@ void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_contex heap->DumpObject(LOG(INTERNAL_FATAL), reinterpret_cast<mirror::Object*>(info->si_addr)); } } - if (getenv("debug_db_uid") != NULL || getenv("art_wait_for_gdb_on_crash") != NULL) { + if (getenv("debug_db_uid") != nullptr || getenv("art_wait_for_gdb_on_crash") != nullptr) { LOG(INTERNAL_FATAL) << "********************************************************\n" - << "* Process " << getpid() << " thread " << tid << " \"" << thread_name << "\"" + << "* Process " << getpid() << " thread " << tid << " \"" << thread_name + << "\"" << " has been suspended while crashing.\n" << "* Attach gdb:\n" << "* gdb -p " << tid << "\n" @@ -370,7 +371,7 @@ void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_contex memset(&action, 0, sizeof(action)); sigemptyset(&action.sa_mask); action.sa_handler = SIG_DFL; - sigaction(signal_number, &action, NULL); + sigaction(signal_number, &action, nullptr); // ...and re-raise so we die with the appropriate status. kill(getpid(), signal_number); #else @@ -390,19 +391,19 @@ void Runtime::InitPlatformSignalHandlers() { action.sa_flags |= SA_ONSTACK; int rc = 0; - rc += sigaction(SIGABRT, &action, NULL); - rc += sigaction(SIGBUS, &action, NULL); - rc += sigaction(SIGFPE, &action, NULL); - rc += sigaction(SIGILL, &action, NULL); - rc += sigaction(SIGPIPE, &action, NULL); - rc += sigaction(SIGSEGV, &action, NULL); + rc += sigaction(SIGABRT, &action, nullptr); + rc += sigaction(SIGBUS, &action, nullptr); + rc += sigaction(SIGFPE, &action, nullptr); + rc += sigaction(SIGILL, &action, nullptr); + rc += sigaction(SIGPIPE, &action, nullptr); + rc += sigaction(SIGSEGV, &action, nullptr); #if defined(SIGSTKFLT) - rc += sigaction(SIGSTKFLT, &action, NULL); + rc += sigaction(SIGSTKFLT, &action, nullptr); #endif - rc += sigaction(SIGTRAP, &action, NULL); + rc += sigaction(SIGTRAP, &action, nullptr); // Special dump-all timeout. if (GetTimeoutSignal() != -1) { - rc += sigaction(GetTimeoutSignal(), &action, NULL); + rc += sigaction(GetTimeoutSignal(), &action, nullptr); } CHECK_EQ(rc, 0); } |