Fix MISRA 2012 rule 10.4 violations (#852)

Fix MISRA 2012 rule 10.4 violations
This commit is contained in:
chinglee-iot
2023-11-28 19:21:03 +08:00
committed by GitHub
parent ce88adea2a
commit 1813a4551e
4 changed files with 27 additions and 27 deletions

View File

@ -362,7 +362,7 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
* this is a quirk of the implementation that means otherwise the free
* space would be reported as one byte smaller than would be logically
* expected. */
if( xBufferSizeBytes < ( xBufferSizeBytes + 1 + sizeof( StreamBuffer_t ) ) )
if( xBufferSizeBytes < ( xBufferSizeBytes + 1U + sizeof( StreamBuffer_t ) ) )
{
xBufferSizeBytes++;
pvAllocatedMemory = pvPortMalloc( xBufferSizeBytes + sizeof( StreamBuffer_t ) );