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
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 @@
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));
}