commit | d564a98a2e769ff2609b6b8c8a092b329ec4b3fe | [log] [tgz] |
---|---|---|
author | Jiyong Park <jiyong@google.com> | Mon Nov 16 20:16:30 2020 +0900 |
committer | Jiyong Park <jiyong@google.com> | Mon Nov 16 22:56:47 2020 +0900 |
tree | 3c8938987e732952fe08dd1fbb905651b2935f0c | |
parent | 4f97a8ca543efa465a8e13ebcd689a08f95ea351 [diff] |
binder_ndk: fix bugprone-unhandled-self-assignment Bug: 162909698 Test: m checkbuild Change-Id: I2a448282bef0a79aff62da70175e35d43da4699f
diff --git a/libs/binder/ndk/include_cpp/android/binder_auto_utils.h b/libs/binder/ndk/include_cpp/android/binder_auto_utils.h index 8d60226..d9d9baf 100644 --- a/libs/binder/ndk/include_cpp/android/binder_auto_utils.h +++ b/libs/binder/ndk/include_cpp/android/binder_auto_utils.h
@@ -74,6 +74,9 @@ * ownership of that other object. */ SpAIBinder& operator=(const SpAIBinder& other) { + if (this == &other) { + return *this; + } AIBinder_incStrong(other.mBinder); set(other.mBinder); return *this;