diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 87dfe111709141..487acd27ed883e 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -921,14 +921,12 @@ void ReadHandler::ClearStateFlag(ReadHandlerFlags aFlag) size_t ReadHandler::GetReportBufferMaxSize() { - size_t maxBufSize = kMaxSecureSduLengthBytes; Transport::SecureSession * session = GetSession(); if (session && session->AllowsLargePayload()) { - maxBufSize = kMaxLargeSecureSduLengthBytes; + return kMaxLargeSecureSduLengthBytes; } - - return maxBufSize; + return kMaxSecureSduLengthBytes; } } // namespace app