summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2019-09-05 14:37:35 -0700
committerSteven Moreland <smoreland@google.com>2019-09-07 00:58:19 +0000
commite953ef383dea11dc3a41799854051c6bb3119b01 (patch)
tree67d228360b4d0583a8a59d05748ddf34b91ba20f
parentf0dd160cbe7c80204a2e361896f677a2bd12863f (diff)
downloadlibhidl-e953ef383dea11dc3a41799854051c6bb3119b01.tar.gz
hidl_vec: mOwnsBuffer false by default
There was an extraneous set to make this true. I had left it alone while making other changes just in case, but it should be safe to remove it now. Bug: N/A Test: TH runs libhidl_test Change-Id: I07122ac8202a69bd376c3b020735eddecaee8190
-rw-r--r--base/include/hidl/HidlSupport.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 71448da..1b91c26 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -336,11 +336,9 @@ template<typename T>
struct hidl_vec {
using value_type = T;
- hidl_vec() : mBuffer(nullptr), mSize(0), mOwnsBuffer(true) {
+ hidl_vec() : mBuffer(nullptr), mSize(0), mOwnsBuffer(false) {
static_assert(hidl_vec<T>::kOffsetOfBuffer == 0, "wrong offset");
- // mOwnsBuffer true to match original implementation
-
memset(mPad, 0, sizeof(mPad));
}