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 /sigchainlib | |
parent | 1f02f1a7b3073b8fef07770a67fbf94afad317f0 (diff) | |
download | art-2cebb24bfc3247d3e9be138a3350106737455918.zip art-2cebb24bfc3247d3e9be138a3350106737455918.tar.gz art-2cebb24bfc3247d3e9be138a3350106737455918.tar.bz2 |
Replace NULL with nullptr
Also fixed some lines that were too long, and a few other minor
details.
Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
Diffstat (limited to 'sigchainlib')
-rw-r--r-- | sigchainlib/sigchain.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sigchainlib/sigchain.cc b/sigchainlib/sigchain.cc index e61fcd8..0359ed3 100644 --- a/sigchainlib/sigchain.cc +++ b/sigchainlib/sigchain.cc @@ -51,7 +51,7 @@ class SignalAction { // Unclaim the signal and restore the old action. void Unclaim(int signal) { claimed_ = false; - sigaction(signal, &action_, NULL); // Restore old action. + sigaction(signal, &action_, nullptr); // Restore old action. } // Get the action associated with this signal. @@ -133,14 +133,14 @@ extern "C" void InvokeUserSignalHandler(int sig, siginfo_t* info, void* context) const struct sigaction& action = user_sigactions[sig].GetAction(); if (user_sigactions[sig].OldStyle()) { - if (action.sa_handler != NULL) { + if (action.sa_handler != nullptr) { action.sa_handler(sig); } else { signal(sig, SIG_DFL); raise(sig); } } else { - if (action.sa_sigaction != NULL) { + if (action.sa_sigaction != nullptr) { action.sa_sigaction(sig, info, context); } else { signal(sig, SIG_DFL); @@ -172,10 +172,10 @@ extern "C" int sigaction(int signal, const struct sigaction* new_action, struct if (signal > 0 && signal < _NSIG && user_sigactions[signal].IsClaimed() && (new_action == nullptr || new_action->sa_handler != SIG_DFL)) { struct sigaction saved_action = user_sigactions[signal].GetAction(); - if (new_action != NULL) { + if (new_action != nullptr) { user_sigactions[signal].SetAction(*new_action, false); } - if (old_action != NULL) { + if (old_action != nullptr) { *old_action = saved_action; } return 0; @@ -242,7 +242,7 @@ extern "C" sighandler_t signal(int signal, sighandler_t handler) { extern "C" int sigprocmask(int how, const sigset_t* bionic_new_set, sigset_t* bionic_old_set) { const sigset_t* new_set_ptr = bionic_new_set; sigset_t tmpset; - if (bionic_new_set != NULL) { + if (bionic_new_set != nullptr) { tmpset = *bionic_new_set; if (how == SIG_BLOCK) { |