freertos: Synchronize xStreamBufferSend() to v10.4.3

This commit synchronizes xStreamBufferSend() with upstream v10.4.3.
pull/9842/head
Darian Leung 2022-08-24 21:06:04 +08:00
rodzic 77f2eba57e
commit 5352ba06fa
1 zmienionych plików z 4 dodań i 5 usunięć

Wyświetl plik

@ -588,14 +588,13 @@ size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
size_t xReturn, xSpace = 0;
size_t xRequiredSpace = xDataLengthBytes;
TimeOut_t xTimeOut;
size_t xMaxReportedSpace = 0;
configASSERT( pvTxData );
configASSERT( pxStreamBuffer );
/* The maximum amount of space a stream buffer will ever report is its length
* minus 1. */
xMaxReportedSpace = pxStreamBuffer->xLength - ( size_t ) 1;
const size_t xMaxReportedSpace = pxStreamBuffer->xLength - ( size_t ) 1;
configASSERT( pvTxData );
configASSERT( pxStreamBuffer );
/* This send function is used to write to both message buffers and stream
* buffers. If this is a message buffer then the space needed must be