fix: rectify the type_cast

Signed-off-by: jialinbo <jialinbo@huawei.com>
This commit is contained in:
jialinbo 2024-07-23 03:52:31 +00:00
parent fbe002ab85
commit c74e6fd4fc
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ private:
void Transaction(binder_transaction_data_secctx& trSecctx);
void OnTransaction(int32_t cmd, int32_t &error);
void OnTransaction(uint32_t cmd, int32_t &error);
void OnSpawnThread();

View File

@ -743,13 +743,13 @@ void BinderInvoker::OnSpawnThread()
}
}
void BinderInvoker::OnTransaction(int32_t cmd, int32_t &error)
void BinderInvoker::OnTransaction(uint32_t cmd, int32_t &error)
{
binder_transaction_data_secctx trSecctx = {
.secctx = 0,
};
const uint8_t *buffer = nullptr;
bool isSecctx = (cmd == static_cast<int32_t>(BR_TRANSACTION_SEC_CTX));
bool isSecctx = (cmd == static_cast<uint32_t>(BR_TRANSACTION_SEC_CTX));
uint32_t bufferSize = isSecctx ? sizeof(binder_transaction_data_secctx) : sizeof(binder_transaction_data);
buffer = input_.ReadBuffer(bufferSize, false);