Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and yunhanw-google committed Aug 12, 2023
1 parent 4e2c23c commit f2022e9
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/controller/java/CHIPDeviceController-JNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1859,10 +1859,10 @@ JNI_METHOD(void, write)
jint imTimeoutMs)
{
chip::DeviceLayer::StackLock lock;
CHIP_ERROR err = CHIP_NO_ERROR;
jint listSize = 0;
auto callback = reinterpret_cast<WriteAttributesCallback *>(callbackHandle);
app::WriteClient * writeClient = nullptr;
CHIP_ERROR err = CHIP_NO_ERROR;
jint listSize = 0;
auto callback = reinterpret_cast<WriteAttributesCallback *>(callbackHandle);
app::WriteClient * writeClient = nullptr;
uint16_t convertedTimedRequestTimeoutMs = static_cast<uint16_t>(timedRequestTimeoutMs);

ChipLogDetail(Controller, "IM write() called");
Expand All @@ -1873,9 +1873,9 @@ JNI_METHOD(void, write)
VerifyOrExit(attributeList != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT);
SuccessOrExit(err = JniReferences::GetInstance().GetListSize(attributeList, listSize));

writeClient = Platform::New<app::WriteClient>(device->GetExchangeManager(), callback->GetChunkedWriteCallback(),
convertedTimedRequestTimeoutMs != 0 ? Optional<uint16_t>(convertedTimedRequestTimeoutMs)
: Optional<uint16_t>::Missing());
writeClient = Platform::New<app::WriteClient>(
device->GetExchangeManager(), callback->GetChunkedWriteCallback(),
convertedTimedRequestTimeoutMs != 0 ? Optional<uint16_t>(convertedTimedRequestTimeoutMs) : Optional<uint16_t>::Missing());

for (uint8_t i = 0; i < listSize; i++)
{
Expand Down Expand Up @@ -2007,7 +2007,7 @@ JNI_METHOD(void, invoke)
jbyte * tlvBytesObjBytes = nullptr;
jsize length = 0;
TLV::TLVReader reader;
TLV::TLVWriter * writer = nullptr;
TLV::TLVWriter * writer = nullptr;
uint16_t convertedTimedRequestTimeoutMs = static_cast<uint16_t>(timedRequestTimeoutMs);

ChipLogDetail(Controller, "IM invoke() called");
Expand Down Expand Up @@ -2062,8 +2062,9 @@ JNI_METHOD(void, invoke)
reader.Init(reinterpret_cast<const uint8_t *>(tlvBytesObjBytes), static_cast<size_t>(length));
reader.Next();
SuccessOrExit(err = writer->CopyContainer(TLV::ContextTag(app::CommandDataIB::Tag::kFields), reader));
SuccessOrExit(err = commandSender->FinishCommand(convertedTimedRequestTimeoutMs != 0 ? Optional<uint16_t>(convertedTimedRequestTimeoutMs)
: Optional<uint16_t>::Missing()));
SuccessOrExit(err = commandSender->FinishCommand(convertedTimedRequestTimeoutMs != 0
? Optional<uint16_t>(convertedTimedRequestTimeoutMs)
: Optional<uint16_t>::Missing()));

SuccessOrExit(err =
commandSender->SendCommandRequest(device->GetSecureSession().Value(),
Expand Down

0 comments on commit f2022e9

Please sign in to comment.