summaryrefslogtreecommitdiffstats
path: root/libs/binder/IInterface.cpp
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-09-08 18:59:09 -0700
committerDan Albert <danalbert@google.com>2014-09-16 17:52:06 -0700
commit1474f8864faafebc92ff79959bb5c698bd29b704 (patch)
tree7e60cb941b744698bb8bf40e81f50ff14c46e987 /libs/binder/IInterface.cpp
parent86aeb9ef154d7aa63c58cbe5be62e5b61d6ae5fa (diff)
downloadframeworks_native-1474f8864faafebc92ff79959bb5c698bd29b704.zip
frameworks_native-1474f8864faafebc92ff79959bb5c698bd29b704.tar.gz
frameworks_native-1474f8864faafebc92ff79959bb5c698bd29b704.tar.bz2
Don't check if this == NULL.
Entering a method with this == NULL is undefined behavior. Clang whines about this. Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c
Diffstat (limited to 'libs/binder/IInterface.cpp')
-rw-r--r--libs/binder/IInterface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/IInterface.cpp b/libs/binder/IInterface.cpp
index 29acf5d..99a9ffe 100644
--- a/libs/binder/IInterface.cpp
+++ b/libs/binder/IInterface.cpp
@@ -29,12 +29,12 @@ IInterface::~IInterface() {
sp<IBinder> IInterface::asBinder()
{
- return this ? onAsBinder() : NULL;
+ return onAsBinder();
}
sp<const IBinder> IInterface::asBinder() const
{
- return this ? const_cast<IInterface*>(this)->onAsBinder() : NULL;
+ return const_cast<IInterface*>(this)->onAsBinder();
}
// ---------------------------------------------------------------------------