Skip to content

Commit

Permalink
fixing clang-tidy error
Browse files Browse the repository at this point in the history
  • Loading branch information
Alami-Amine committed Dec 20, 2024
1 parent 264ba3e commit 993edbd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/lib/support/CodeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
* @def ReturnErrorVariantOnFailure(expr)
*
* @brief
* This is for use when the caller function returns a Variant type. It returns a CHIP_ERROR variant with the corresponding error
* This is for use when the calling function returns a Variant type. It returns a CHIP_ERROR variant with the corresponding error
* code if the expression returns an error. For a CHIP_ERROR expression, this means any value other
* than CHIP_NO_ERROR. For an integer expression, this means non-zero.
*
Expand Down
16 changes: 6 additions & 10 deletions src/protocols/secure_channel/CASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1138,19 +1138,15 @@ CASESession::NextStep CASESession::HandleSigma1(System::PacketBufferHandle && ms

return NextStep::Create<Step>(Step::kSendSigma2);
}
else
{
ChipLogError(SecureChannel, "CASE failed to match destination ID with local fabrics");
ChipLogByteSpan(SecureChannel, parsedSigma1.destinationId);

// FindLocalNodeFromDestinationId returns CHIP_ERROR_KEY_NOT_FOUND if Sigma1's DestinationId does not match any
// candidateDestinationId, this will trigger a status Report with ProtocolCode = NoSharedTrustRoots.
ChipLogError(SecureChannel, "CASE failed to match destination ID with local fabrics");
ChipLogByteSpan(SecureChannel, parsedSigma1.destinationId);

// Returning a CHIP_ERROR variant that will trigger a corresponding Status Report.
return NextStep::Create<CHIP_ERROR>(err);
}
// FindLocalNodeFromDestinationId returns CHIP_ERROR_KEY_NOT_FOUND if Sigma1's DestinationId does not match any
// candidateDestinationId, this will trigger a status Report with ProtocolCode = NoSharedTrustRoots.

return NextStep::Create<CHIP_ERROR>(CHIP_NO_ERROR);
// Returning a CHIP_ERROR variant that will trigger a corresponding Status Report.
return NextStep::Create<CHIP_ERROR>(err);
}

CHIP_ERROR CASESession::PrepareSigma2Resume(EncodeSigma2ResumeInputs & outSigma2ResData)
Expand Down

0 comments on commit 993edbd

Please sign in to comment.