From 4e5c6e71b803a54de1190336e14fff2b68f7676a Mon Sep 17 00:00:00 2001 From: Alami-Amine Date: Fri, 20 Dec 2024 20:07:20 +0100 Subject: [PATCH] fixing clang-tidy error --- src/protocols/secure_channel/CASESession.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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)