summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nandana Dutt <nandana@google.com> 2018-09-26 11:22:02 +0100
committer Nandana Dutt <nandana@google.com> 2018-09-26 11:27:17 +0100
commit263cf383a4be425f0a5035d7d44ebce2a6173c9c (patch)
treedc5c9fa1530eda8bae697190a2caaf52a73805a3
parentf3cf54a2f57154035eed4c8506e34ab9b9f75064 (diff)
Replace NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning. Was originally part of c67f9a4cf0d7894f7b49f70806ac323630ba178e but was dropped when merging to aosp. Test: m Bug: 68236239 Change-Id: Iaba035716673d38f31ab6beb0cef431747349f72
-rw-r--r--cmds/dumpstate/DumpstateUtil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds/dumpstate/DumpstateUtil.cpp b/cmds/dumpstate/DumpstateUtil.cpp
index 85eb464104..600a500e86 100644
--- a/cmds/dumpstate/DumpstateUtil.cpp
+++ b/cmds/dumpstate/DumpstateUtil.cpp
@@ -56,11 +56,11 @@ static bool waitpid_with_timeout(pid_t pid, int timeout_ms, int* status) {
timespec ts;
ts.tv_sec = MSEC_TO_SEC(timeout_ms);
ts.tv_nsec = (timeout_ms % 1000) * 1000000;
- int ret = TEMP_FAILURE_RETRY(sigtimedwait(&child_mask, NULL, &ts));
+ int ret = TEMP_FAILURE_RETRY(sigtimedwait(&child_mask, nullptr, &ts));
int saved_errno = errno;
// Set the signals back the way they were.
- if (sigprocmask(SIG_SETMASK, &old_mask, NULL) == -1) {
+ if (sigprocmask(SIG_SETMASK, &old_mask, nullptr) == -1) {
printf("*** sigprocmask failed: %s\n", strerror(errno));
if (ret == 0) {
return false;
@@ -310,7 +310,7 @@ int RunCommandToFd(int fd, const std::string& title, const std::vector<std::stri
struct sigaction sigact;
memset(&sigact, 0, sizeof(sigact));
sigact.sa_handler = SIG_IGN;
- sigaction(SIGPIPE, &sigact, NULL);
+ sigaction(SIGPIPE, &sigact, nullptr);
execvp(path, (char**)args.data());
// execvp's result will be handled after waitpid_with_timeout() below, but