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 andy31415 committed Oct 27, 2021
1 parent 984de49 commit 9ee9dd6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/app/clusters/basic/basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,18 @@ void emberAfBasicClusterServerInitCallback(chip::EndpointId endpoint)
size_t serialNumberLen;
if (ConfigurationMgr().GetSerialNumber(serialNumberString, sizeof(serialNumberString), serialNumberLen) == CHIP_NO_ERROR)
{
status = Attributes::SerialNumber::Set(endpoint,
chip::CharSpan(serialNumberString, strlen(serialNumberString)));
VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
ChipLogError(Zcl, "Error setting Serial Number String: 0x%02x", status));
status = Attributes::SerialNumber::Set(endpoint, chip::CharSpan(serialNumberString, strlen(serialNumberString)));
VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status, ChipLogError(Zcl, "Error setting Serial Number String: 0x%02x", status));
}

char manufacturingDateString[17];
uint16_t manufacturingYear;
uint8_t manufacturingMonth;
uint8_t manufacturingDayOfMonth;
uint8_t manufacturingMonth;
uint8_t manufacturingDayOfMonth;
if (ConfigurationMgr().GetManufacturingDate(manufacturingYear, manufacturingMonth, manufacturingDayOfMonth) == CHIP_NO_ERROR)
{
status = Attributes::ManufacturingDate::Set(endpoint,
chip::CharSpan(manufacturingDateString, strlen(manufacturingDateString)));
status =
Attributes::ManufacturingDate::Set(endpoint, chip::CharSpan(manufacturingDateString, strlen(manufacturingDateString)));
VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == status,
ChipLogError(Zcl, "Error setting Manufacturing Date String: 0x%02x", status));
}
Expand Down

0 comments on commit 9ee9dd6

Please sign in to comment.