Skip to content

Commit

Permalink
Restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Apr 25, 2022
1 parent 3c584ab commit 65f1c55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/app/util/attribute-storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ EmberAfStatus emAfClusterPreAttributeChangedCallback(const app::ConcreteAttribut
EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS;
// Casting and calling a function pointer on the same line results in ignoring the return
// of the call on gcc-arm-none-eabi-9-2019-q4-major
EmberAfClusterPreAttributeChangedCallback f = (EmberAfClusterPreAttributeChangedCallback) (emberAfFindClusterFunction(
cluster, CLUSTER_MASK_PRE_ATTRIBUTE_CHANGED_FUNCTION));
EmberAfClusterPreAttributeChangedCallback f = (EmberAfClusterPreAttributeChangedCallback)(
emberAfFindClusterFunction(cluster, CLUSTER_MASK_PRE_ATTRIBUTE_CHANGED_FUNCTION));
if (f != nullptr)
{
status = f(attributePath, attributeType, size, value);
Expand Down
18 changes: 9 additions & 9 deletions src/app/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,23 +437,23 @@ EmberStatus emberAfSendDefaultResponse(const EmberAfClusterCommand * cmd, EmberA

void emberAfCopyInt16u(uint8_t * data, uint16_t index, uint16_t x)
{
data[index] = (uint8_t) (((x)) & 0xFF);
data[index + 1] = (uint8_t) (((x) >> 8) & 0xFF);
data[index] = (uint8_t)(((x)) & 0xFF);
data[index + 1] = (uint8_t)(((x) >> 8) & 0xFF);
}

void emberAfCopyInt24u(uint8_t * data, uint16_t index, uint32_t x)
{
data[index] = (uint8_t) (((x)) & 0xFF);
data[index + 1] = (uint8_t) (((x) >> 8) & 0xFF);
data[index + 2] = (uint8_t) (((x) >> 16) & 0xFF);
data[index] = (uint8_t)(((x)) & 0xFF);
data[index + 1] = (uint8_t)(((x) >> 8) & 0xFF);
data[index + 2] = (uint8_t)(((x) >> 16) & 0xFF);
}

void emberAfCopyInt32u(uint8_t * data, uint16_t index, uint32_t x)
{
data[index] = (uint8_t) (((x)) & 0xFF);
data[index + 1] = (uint8_t) (((x) >> 8) & 0xFF);
data[index + 2] = (uint8_t) (((x) >> 16) & 0xFF);
data[index + 3] = (uint8_t) (((x) >> 24) & 0xFF);
data[index] = (uint8_t)(((x)) & 0xFF);
data[index + 1] = (uint8_t)(((x) >> 8) & 0xFF);
data[index + 2] = (uint8_t)(((x) >> 16) & 0xFF);
data[index + 3] = (uint8_t)(((x) >> 24) & 0xFF);
}

void emberAfCopyString(uint8_t * dest, const uint8_t * src, size_t size)
Expand Down

0 comments on commit 65f1c55

Please sign in to comment.