diff options
author | Dan Albert <danalbert@google.com> | 2014-10-15 22:45:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-10-15 22:45:07 +0000 |
commit | 9cc849500df0bba42d3ed19b90c38ff1dffd2262 (patch) | |
tree | c927bdfdbc446085035634b18455a27a0c31dc9a /libs | |
parent | 26a2814963de75f14dfbe7cf3d45e993727891cf (diff) | |
parent | 1474f8864faafebc92ff79959bb5c698bd29b704 (diff) | |
download | frameworks_native-9cc849500df0bba42d3ed19b90c38ff1dffd2262.zip frameworks_native-9cc849500df0bba42d3ed19b90c38ff1dffd2262.tar.gz frameworks_native-9cc849500df0bba42d3ed19b90c38ff1dffd2262.tar.bz2 |
Merge "Don't check if this == NULL."
Diffstat (limited to 'libs')
-rw-r--r-- | libs/binder/IInterface.cpp | 4 | ||||
-rw-r--r-- | libs/gui/LayerState.cpp | 2 |
2 files changed, 3 insertions, 3 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(); } // --------------------------------------------------------------------------- diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index acdbd77..498953f 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -75,7 +75,7 @@ status_t ComposerState::read(const Parcel& input) { status_t DisplayState::write(Parcel& output) const { output.writeStrongBinder(token); - output.writeStrongBinder(surface->asBinder()); + output.writeStrongBinder(surface != NULL ? surface->asBinder() : NULL); output.writeInt32(what); output.writeInt32(layerStack); output.writeInt32(orientation); |