mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-13 01:27:48 -04:00
fixup off-by-one comment indentation
This commit is contained in:
parent
f6bd2e3aed
commit
3222f6fed2
1 changed files with 5 additions and 5 deletions
|
@ -1191,21 +1191,21 @@ static size_t prvReadBytesFromBuffer( StreamBuffer_t * pxStreamBuffer,
|
||||||
configASSERT( xCount != ( size_t ) 0 );
|
configASSERT( xCount != ( size_t ) 0 );
|
||||||
|
|
||||||
/* Calculate the number of bytes that can be read - which may be
|
/* Calculate the number of bytes that can be read - which may be
|
||||||
* less than the number wanted if the data wraps around to the start of
|
* less than the number wanted if the data wraps around to the start of
|
||||||
* the buffer. */
|
* the buffer. */
|
||||||
xFirstLength = configMIN( pxStreamBuffer->xLength - xTail, xCount );
|
xFirstLength = configMIN( pxStreamBuffer->xLength - xTail, xCount );
|
||||||
|
|
||||||
/* Obtain the number of bytes it is possible to obtain in the first
|
/* Obtain the number of bytes it is possible to obtain in the first
|
||||||
* read. Asserts check bounds of read and write. */
|
* read. Asserts check bounds of read and write. */
|
||||||
configASSERT( xFirstLength <= xCount );
|
configASSERT( xFirstLength <= xCount );
|
||||||
configASSERT( ( xTail + xFirstLength ) <= pxStreamBuffer->xLength );
|
configASSERT( ( xTail + xFirstLength ) <= pxStreamBuffer->xLength );
|
||||||
( void ) memcpy( ( void * ) pucData, ( const void * ) &( pxStreamBuffer->pucBuffer[ xTail ] ), xFirstLength ); /*lint !e9087 memcpy() requires void *. */
|
( void ) memcpy( ( void * ) pucData, ( const void * ) &( pxStreamBuffer->pucBuffer[ xTail ] ), xFirstLength ); /*lint !e9087 memcpy() requires void *. */
|
||||||
|
|
||||||
/* If the total number of wanted bytes is greater than the number
|
/* If the total number of wanted bytes is greater than the number
|
||||||
* that could be read in the first read... */
|
* that could be read in the first read... */
|
||||||
if( xCount > xFirstLength )
|
if( xCount > xFirstLength )
|
||||||
{
|
{
|
||||||
/*...then read the remaining bytes from the start of the buffer. */
|
/* ...then read the remaining bytes from the start of the buffer. */
|
||||||
configASSERT( xCount <= xCount );
|
configASSERT( xCount <= xCount );
|
||||||
( void ) memcpy( ( void * ) &( pucData[ xFirstLength ] ), ( void * ) ( pxStreamBuffer->pucBuffer ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */
|
( void ) memcpy( ( void * ) &( pucData[ xFirstLength ] ), ( void * ) ( pxStreamBuffer->pucBuffer ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue