Skip to content

Commit 993edbd

Browse files
committed
fixing clang-tidy error
1 parent 264ba3e commit 993edbd

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/lib/support/CodeUtils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
* @def ReturnErrorVariantOnFailure(expr)
161161
*
162162
* @brief
163-
* This is for use when the caller function returns a Variant type. It returns a CHIP_ERROR variant with the corresponding error
163+
* This is for use when the calling function returns a Variant type. It returns a CHIP_ERROR variant with the corresponding error
164164
* code if the expression returns an error. For a CHIP_ERROR expression, this means any value other
165165
* than CHIP_NO_ERROR. For an integer expression, this means non-zero.
166166
*

src/protocols/secure_channel/CASESession.cpp

+6-10
Original file line numberDiff line numberDiff line change
@@ -1138,19 +1138,15 @@ CASESession::NextStep CASESession::HandleSigma1(System::PacketBufferHandle && ms
11381138

11391139
return NextStep::Create<Step>(Step::kSendSigma2);
11401140
}
1141-
else
1142-
{
1143-
ChipLogError(SecureChannel, "CASE failed to match destination ID with local fabrics");
1144-
ChipLogByteSpan(SecureChannel, parsedSigma1.destinationId);
11451141

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

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

1153-
return NextStep::Create<CHIP_ERROR>(CHIP_NO_ERROR);
1148+
// Returning a CHIP_ERROR variant that will trigger a corresponding Status Report.
1149+
return NextStep::Create<CHIP_ERROR>(err);
11541150
}
11551151

11561152
CHIP_ERROR CASESession::PrepareSigma2Resume(EncodeSigma2ResumeInputs & outSigma2ResData)

0 commit comments

Comments
 (0)