Don't check if this == NULL.
Entering a method with this == NULL is undefined behavior. Clang whines
about this.
Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c
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 @@
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();
}
// ---------------------------------------------------------------------------