mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-20 07:13:55 +08:00
Use unsigned types/constants where needed. (#226)
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
This commit is contained in:
@ -161,7 +161,8 @@ section macros. */
|
|||||||
|
|
||||||
BaseType_t xNetworkBuffersInitialise( void )
|
BaseType_t xNetworkBuffersInitialise( void )
|
||||||
{
|
{
|
||||||
BaseType_t xReturn, x;
|
BaseType_t xReturn;
|
||||||
|
uint32_t x;
|
||||||
|
|
||||||
/* Only initialise the buffers and their associated kernel objects if they
|
/* Only initialise the buffers and their associated kernel objects if they
|
||||||
have not been initialised before. */
|
have not been initialised before. */
|
||||||
@ -182,7 +183,7 @@ BaseType_t xReturn, x;
|
|||||||
from the network interface, and different hardware has different
|
from the network interface, and different hardware has different
|
||||||
requirements. */
|
requirements. */
|
||||||
vNetworkInterfaceAllocateRAMToBuffers( xNetworkBuffers );
|
vNetworkInterfaceAllocateRAMToBuffers( xNetworkBuffers );
|
||||||
for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ )
|
for( x = 0U; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ )
|
||||||
{
|
{
|
||||||
/* Initialise and set the owner of the buffer list items. */
|
/* Initialise and set the owner of the buffer list items. */
|
||||||
vListInitialiseItem( &( xNetworkBuffers[ x ].xBufferListItem ) );
|
vListInitialiseItem( &( xNetworkBuffers[ x ].xBufferListItem ) );
|
||||||
|
@ -95,7 +95,8 @@ static SemaphoreHandle_t xNetworkBufferSemaphore = NULL;
|
|||||||
|
|
||||||
BaseType_t xNetworkBuffersInitialise( void )
|
BaseType_t xNetworkBuffersInitialise( void )
|
||||||
{
|
{
|
||||||
BaseType_t xReturn, x;
|
BaseType_t xReturn;
|
||||||
|
uint32_t x;
|
||||||
|
|
||||||
/* Only initialise the buffers and their associated kernel objects if they
|
/* Only initialise the buffers and their associated kernel objects if they
|
||||||
have not been initialised before. */
|
have not been initialised before. */
|
||||||
@ -126,7 +127,7 @@ BaseType_t xReturn, x;
|
|||||||
|
|
||||||
/* Initialise all the network buffers. No storage is allocated to
|
/* Initialise all the network buffers. No storage is allocated to
|
||||||
the buffers yet. */
|
the buffers yet. */
|
||||||
for( x = 0; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ )
|
for( x = 0U; x < ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS; x++ )
|
||||||
{
|
{
|
||||||
/* Initialise and set the owner of the buffer list items. */
|
/* Initialise and set the owner of the buffer list items. */
|
||||||
xNetworkBufferDescriptors[ x ].pucEthernetBuffer = NULL;
|
xNetworkBufferDescriptors[ x ].pucEthernetBuffer = NULL;
|
||||||
@ -248,7 +249,7 @@ size_t uxCount;
|
|||||||
|
|
||||||
/* Allocate storage of exactly the requested size to the buffer. */
|
/* Allocate storage of exactly the requested size to the buffer. */
|
||||||
configASSERT( pxReturn->pucEthernetBuffer == NULL );
|
configASSERT( pxReturn->pucEthernetBuffer == NULL );
|
||||||
if( xRequestedSizeBytes > 0 )
|
if( xRequestedSizeBytes > 0U )
|
||||||
{
|
{
|
||||||
/* Extra space is obtained so a pointer to the network buffer can
|
/* Extra space is obtained so a pointer to the network buffer can
|
||||||
be stored at the beginning of the buffer. */
|
be stored at the beginning of the buffer. */
|
||||||
|
Reference in New Issue
Block a user