[binder] Replace NULL/0 with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
clang-tidy -checks=modernize-use-nullptr -p compile_commands.json -fix
...
Test: m
Bug: 68236239
Change-Id: I3181bc5683796423a98b0f9b94daf30880c07bdc
diff --git a/libs/binder/ProcessInfoService.cpp b/libs/binder/ProcessInfoService.cpp
index 8939d9c..5cb2033 100644
--- a/libs/binder/ProcessInfoService.cpp
+++ b/libs/binder/ProcessInfoService.cpp
@@ -36,7 +36,7 @@
for (int i = 0; i < BINDER_ATTEMPT_LIMIT; i++) {
- if (pis != NULL) {
+ if (pis != nullptr) {
err = pis->getProcessStatesFromPids(length, /*in*/ pids, /*out*/ states);
if (err == NO_ERROR) return NO_ERROR; // success
if (IInterface::asBinder(pis)->isBinderAlive()) return err;
@@ -68,7 +68,7 @@
for (int i = 0; i < BINDER_ATTEMPT_LIMIT; i++) {
- if (pis != NULL) {
+ if (pis != nullptr) {
err = pis->getProcessStatesAndOomScoresFromPids(length,
/*in*/ pids, /*out*/ states, /*out*/ scores);
if (err == NO_ERROR) return NO_ERROR; // success
@@ -93,7 +93,7 @@
void ProcessInfoService::updateBinderLocked() {
const sp<IServiceManager> sm(defaultServiceManager());
- if (sm != NULL) {
+ if (sm != nullptr) {
const String16 name("processinfo");
mProcessInfoService = interface_cast<IProcessInfoService>(sm->checkService(name));
}