summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wicker <14828980+gkwicker@users.noreply.github.com>2020-08-28 16:24:25 -0700
committerGitHub <noreply@github.com>2020-08-28 16:24:25 -0700
commitbcd5dec6c46392c8ab30a091dda65379d46a2fb5 (patch)
tree9199aa29ac822bb793403bf11c35fac9b7de50df
parent3fc432f7beb830cfab5bad5ae0e4f52a1ea59ce7 (diff)
downloadfreertos-git-bcd5dec6c46392c8ab30a091dda65379d46a2fb5.tar.gz
Use unsigned types/constants where needed. (#226)
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
-rw-r--r--FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c5
-rw-r--r--FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c
index cf0fa1105..4da626c95 100644
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_1.c
@@ -161,7 +161,8 @@ section macros. */
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
have not been initialised before. */
@@ -182,7 +183,7 @@ BaseType_t xReturn, x;
from the network interface, and different hardware has different
requirements. */
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. */
vListInitialiseItem( &( xNetworkBuffers[ x ].xBufferListItem ) );
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c
index d8d95e64f..896ca731e 100644
--- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c
+++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/BufferManagement/BufferAllocation_2.c
@@ -95,7 +95,8 @@ static SemaphoreHandle_t xNetworkBufferSemaphore = NULL;
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
have not been initialised before. */
@@ -126,7 +127,7 @@ BaseType_t xReturn, x;
/* Initialise all the network buffers. No storage is allocated to
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. */
xNetworkBufferDescriptors[ x ].pucEthernetBuffer = NULL;
@@ -248,7 +249,7 @@ size_t uxCount;
/* Allocate storage of exactly the requested size to the buffer. */
configASSERT( pxReturn->pucEthernetBuffer == NULL );
- if( xRequestedSizeBytes > 0 )
+ if( xRequestedSizeBytes > 0U )
{
/* Extra space is obtained so a pointer to the network buffer can
be stored at the beginning of the buffer. */