[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
Merged-In: I3181bc5683796423a98b0f9b94daf30880c07bdc
(cherry picked from commit 91635563b8a1bf7a31e4ceb439728dacb79abd76)
diff --git a/libs/binder/IResultReceiver.cpp b/libs/binder/IResultReceiver.cpp
index 646809e..14b5259 100644
--- a/libs/binder/IResultReceiver.cpp
+++ b/libs/binder/IResultReceiver.cpp
@@ -40,7 +40,7 @@
Parcel data;
data.writeInterfaceToken(IResultReceiver::getInterfaceDescriptor());
data.writeInt32(resultCode);
- remote()->transact(OP_SEND, data, NULL, IBinder::FLAG_ONEWAY);
+ remote()->transact(OP_SEND, data, nullptr, IBinder::FLAG_ONEWAY);
}
};
@@ -56,7 +56,7 @@
CHECK_INTERFACE(IResultReceiver, data, reply);
int32_t resultCode = data.readInt32();
send(resultCode);
- if (reply != NULL) {
+ if (reply != nullptr) {
reply->writeNoException();
}
return NO_ERROR;