summaryrefslogtreecommitdiff
path: root/Debug.cpp
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2018-07-23 14:55:39 -0700
committerYi Kong <yikong@google.com>2018-07-23 14:55:39 -0700
commit55d4107c06fb0dc4051a3039174fbba36968f108 (patch)
treeed946df01e6c2e5a6c1696f062fe57d0f5777fa6 /Debug.cpp
parentf729b64b01f2d40fd91c0d0e34be6f38ad7944cb (diff)
downloadlibhwbinder-55d4107c06fb0dc4051a3039174fbba36968f108.tar.gz
Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I23c4346097d1e7cfbbd7225913a4d187a05f7506
Diffstat (limited to 'Debug.cpp')
-rw-r--r--Debug.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Debug.cpp b/Debug.cpp
index d304d21..38e3a3f 100644
--- a/Debug.cpp
+++ b/Debug.cpp
@@ -166,13 +166,13 @@ void printHexData(int32_t indent, const void *buf, size_t length,
else if (bytesPerLine >= 8) alignment = 2;
else alignment = 1;
}
- if (func == NULL) func = defaultPrintFunc;
+ if (func == nullptr) func = defaultPrintFunc;
size_t offset;
unsigned char *pos = (unsigned char *)buf;
- if (pos == NULL) {
+ if (pos == nullptr) {
if (singleLineBytesCutoff < 0) func(cookie, "\n");
func(cookie, "(NULL)");
return;
@@ -302,7 +302,7 @@ void printHexData(int32_t indent, const void *buf, size_t length,
ssize_t getHWBinderKernelReferences(size_t count, uintptr_t* buf) {
sp<ProcessState> proc = ProcessState::selfOrNull();
- if (proc.get() == NULL) {
+ if (proc.get() == nullptr) {
return 0;
}