diff options
Diffstat (limited to 'libs/binder/Binder.cpp')
-rw-r--r-- | libs/binder/Binder.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/binder/Binder.cpp b/libs/binder/Binder.cpp index a81f44ef8e..1bd7c4fb42 100644 --- a/libs/binder/Binder.cpp +++ b/libs/binder/Binder.cpp @@ -43,17 +43,17 @@ IBinder::~IBinder() sp<IInterface> IBinder::queryLocalInterface(const String16& /*descriptor*/) { - return NULL; + return nullptr; } BBinder* IBinder::localBinder() { - return NULL; + return nullptr; } BpBinder* IBinder::remoteBinder() { - return NULL; + return nullptr; } bool IBinder::checkSubclass(const void* /*subclassID*/) const @@ -76,8 +76,8 @@ status_t IBinder::shellCommand(const sp<IBinder>& target, int in, int out, int e for (size_t i = 0; i < numArgs; i++) { send.writeString16(args[i]); } - send.writeStrongBinder(callback != NULL ? IInterface::asBinder(callback) : NULL); - send.writeStrongBinder(resultReceiver != NULL ? IInterface::asBinder(resultReceiver) : NULL); + send.writeStrongBinder(callback != nullptr ? IInterface::asBinder(callback) : nullptr); + send.writeStrongBinder(resultReceiver != nullptr ? IInterface::asBinder(resultReceiver) : nullptr); return target->transact(SHELL_COMMAND_TRANSACTION, send, &reply); } @@ -130,7 +130,7 @@ status_t BBinder::transact( break; } - if (reply != NULL) { + if (reply != nullptr) { reply->setDataPosition(0); } @@ -171,7 +171,7 @@ void BBinder::attachObject( delete e; e = expected; // Filled in by CAS } - if (e == 0) return; // out of memory + if (e == nullptr) return; // out of memory } AutoMutex _l(e->mLock); @@ -181,7 +181,7 @@ void BBinder::attachObject( void* BBinder::findObject(const void* objectID) const { Extras* e = mExtras.load(std::memory_order_acquire); - if (!e) return NULL; + if (!e) return nullptr; AutoMutex _l(e->mLock); return e->mObjects.find(objectID); @@ -246,7 +246,7 @@ status_t BBinder::onTransact( (void)out; (void)err; - if (resultReceiver != NULL) { + if (resultReceiver != nullptr) { resultReceiver->send(INVALID_OPERATION); } @@ -273,7 +273,7 @@ enum { }; BpRefBase::BpRefBase(const sp<IBinder>& o) - : mRemote(o.get()), mRefs(NULL), mState(0) + : mRemote(o.get()), mRefs(nullptr), mState(0) { extendObjectLifetime(OBJECT_LIFETIME_WEAK); |