Skip to content

Commit 02ef728

Browse files
committed
Updating OpCredsBinding C++ module:
- Resolving linting errors for log message if RCAC data size greater than allocated buffer size
1 parent 2af3bdb commit 02ef728

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/controller/python/OpCredsBinding.cpp

+2-11
Original file line numberDiff line numberDiff line change
@@ -769,20 +769,11 @@ void pychip_GetCommissioningRCACData(uint8_t * rcacDataPtr, size_t * rcacSize, s
769769
return;
770770
}
771771

772-
/// Check if the provided buffer is too small
773-
if (bufferSize < rcacData.size())
774-
{
775-
ChipLogError(Controller, "Provided buffer size (%zu) is too small. Required: %zu. Returning zero-sized buffer.", bufferSize,
776-
rcacData.size());
777-
*rcacSize = 0;
778-
return;
779-
}
780-
781772
// Check if the provided buffer is too small
782773
if (bufferSize < rcacData.size())
783774
{
784-
ChipLogError(Controller, "Provided buffer size (%zu) is too small. Required: %zu. Returning zero-sized buffer.", bufferSize,
785-
rcacData.size());
775+
ChipLogError(Controller, "Provided buffer size (%lu) is too small. Needs to be size %lu. Returning zero-sized buffer.",
776+
static_cast<unsigned long>(bufferSize), static_cast<unsigned long>(rcacData.size()));
786777
*rcacSize = 0;
787778
return;
788779
}

0 commit comments

Comments
 (0)