Skip to content

Commit

Permalink
Fix quality issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gfurtadoalmeida committed Jan 4, 2025
1 parent 2a32b68 commit 1daf36f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions components/esp32_iot_azure/src/azure_iot_adu_workflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,17 +353,17 @@ static AzureIoTResult_t azure_adu_workflow_send_update_results(azure_adu_workflo
{
.lResultCode = 200,
.lExtendedResultCode = 200,
.pucResultDetails = (uint8_t *)"device updated",
.pucResultDetails = (const uint8_t *)"device updated",
.ulResultDetailsLength = sizeof("device updated") - 1,
.ulStepResultsCount = context->update_request.xUpdateManifest.xInstructions.ulStepsCount};

// The order of the step results must match the order of the steps
// in the the update manifest instructions.
for (int32_t step_index = 0; step_index < update_results.ulStepResultsCount; step_index++)
for (int32_t step_index = 0; step_index < update_results.ulStepResultsCount && step_index < _az_IOT_ADU_CLIENT_MAX_INSTRUCTIONS_STEPS; step_index++)
{
update_results.pxStepResults[step_index].ulResultCode = 200;
update_results.pxStepResults[step_index].ulExtendedResultCode = 200;
update_results.pxStepResults[step_index].pucResultDetails = (uint8_t *)"device updated";
update_results.pxStepResults[step_index].pucResultDetails = (const uint8_t *)"device updated";
update_results.pxStepResults[step_index].ulResultDetailsLength = sizeof("device updated") - 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AzureIoTResult_t AzureIoTMessage_PropertiesAppendComponentName(AzureIoTMessagePr
uint32_t component_name_length)
{
return AzureIoTMessage_PropertiesAppend(message_properties,
(uint8_t *)"$.sub",
(const uint8_t *)"$.sub",
sizeof("$.sub") - 1,
component_name,
component_name_length);
Expand All @@ -16,7 +16,7 @@ AzureIoTResult_t AzureIoTMessage_PropertiesAppendContentType(AzureIoTMessageProp
uint32_t content_type_length)
{
return AzureIoTMessage_PropertiesAppend(message_properties,
(uint8_t *)"$.ct",
(const uint8_t *)"$.ct",
sizeof("$.ct") - 1,
content_type,
content_type_length);
Expand All @@ -27,7 +27,7 @@ AzureIoTResult_t AzureIoTMessage_PropertiesAppendContentEncoding(AzureIoTMessage
uint32_t content_encoding_length)
{
return AzureIoTMessage_PropertiesAppend(message_properties,
(uint8_t *)"$.ce",
(const uint8_t *)"$.ce",
sizeof("$.ce") - 1,
content_encoding,
content_encoding_length);
Expand Down

0 comments on commit 1daf36f

Please sign in to comment.