Use unsigned types/constants where needed. (#226)

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
This commit is contained in:
Gary Wicker
2020-08-28 16:24:25 -07:00
committed by GitHub
parent 3fc432f7be
commit bcd5dec6c4
2 changed files with 7 additions and 5 deletions

View File

@ -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 ) );

View File

@ -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. */