diff --git a/src/lib/support/CodeUtils.h b/src/lib/support/CodeUtils.h index 0d8ad3b0bff7cb..cb3591956b3bc0 100644 --- a/src/lib/support/CodeUtils.h +++ b/src/lib/support/CodeUtils.h @@ -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. * diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index ee32a4d8fc02cc..bcee5597a7c8c8 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1138,19 +1138,15 @@ CASESession::NextStep CASESession::HandleSigma1(System::PacketBufferHandle && ms return NextStep::Create(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(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_NO_ERROR); + // Returning a CHIP_ERROR variant that will trigger a corresponding Status Report. + return NextStep::Create(err); } CHIP_ERROR CASESession::PrepareSigma2Resume(EncodeSigma2ResumeInputs & outSigma2ResData)