BQ: fix some uninitialized variables

Bug 27555981
Bug 27556038

Change-Id: I436b6fec589677d7e36c0e980f6e59808415dc0e
This commit is contained in:
Pablo Ceballos 2016-03-15 18:10:49 -07:00 committed by The Android Automerger
parent 5243afa8fa
commit a30d7d90c4
2 changed files with 2 additions and 1 deletions

View File

@ -349,7 +349,7 @@ status_t BnGraphicBufferConsumer::onTransact(
} }
case GET_RELEASED_BUFFERS: { case GET_RELEASED_BUFFERS: {
CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
uint64_t slotMask; uint64_t slotMask = 0;
status_t result = getReleasedBuffers(&slotMask); status_t result = getReleasedBuffers(&slotMask);
reply->writeInt64(static_cast<int64_t>(slotMask)); reply->writeInt64(static_cast<int64_t>(slotMask));
reply->writeInt32(result); reply->writeInt32(result);

View File

@ -435,6 +435,7 @@ status_t BnGraphicBufferProducer::onTransact(
QueueBufferOutput* const output = QueueBufferOutput* const output =
reinterpret_cast<QueueBufferOutput *>( reinterpret_cast<QueueBufferOutput *>(
reply->writeInplace(sizeof(QueueBufferOutput))); reply->writeInplace(sizeof(QueueBufferOutput)));
memset(output, 0, sizeof(QueueBufferOutput));
status_t res = connect(listener, api, producerControlledByApp, output); status_t res = connect(listener, api, producerControlledByApp, output);
reply->writeInt32(res); reply->writeInt32(res);
return NO_ERROR; return NO_ERROR;