Added better pointer declaration readability (#567)

* Add better pointer declaration readability

I revised the declaration of single-line pointers by splitting it into
multiple lines. Now, every pointer is declared (and initialized
accordingly) on its own line. This refactoring should enhance
readability and decrease the probability of error when a new pointer is
added/removed or a current one has its initialization value modified.

Signed-off-by: Cristian Cristea <cristiancristea00@gmail.com>

* Remove unnecessary whitespace characters and lines

It removes whitespace characters at the end of lines (empty or
othwerwise) and clear lines at the end of the file (only one remains).
It is an automatic operation done by git.

Signed-off-by: Cristian Cristea <cristiancristea00@gmail.com>

Signed-off-by: Cristian Cristea <cristiancristea00@gmail.com>
diff --git a/event_groups.c b/event_groups.c
index 27390e6..24c7b37 100644
--- a/event_groups.c
+++ b/event_groups.c
@@ -533,7 +533,8 @@
 EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,

                                 const EventBits_t uxBitsToSet )

 {

-    ListItem_t * pxListItem, * pxNext;

+    ListItem_t * pxListItem;

+    ListItem_t * pxNext;

     ListItem_t const * pxListEnd;

     List_t const * pxList;

     EventBits_t uxBitsToClear = 0, uxBitsWaitedFor, uxControlBits;

diff --git a/portable/ARMv8M/secure/heap/secure_heap.c b/portable/ARMv8M/secure/heap/secure_heap.c
index b3a7378..741b463 100644
--- a/portable/ARMv8M/secure/heap/secure_heap.c
+++ b/portable/ARMv8M/secure/heap/secure_heap.c
@@ -113,7 +113,8 @@
 /**

  * @brief Create a couple of list links to mark the start and end of the list.

  */

-static BlockLink_t xStart, * pxEnd = NULL;

+static BlockLink_t xStart;

+static BlockLink_t * pxEnd = NULL;

 

 /**

  * @brief Keeps track of the number of free bytes remaining, but says nothing

@@ -245,7 +246,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

 

     /* If this is the first call to malloc then the heap will require

diff --git a/portable/GCC/ARM_CM23/secure/secure_heap.c b/portable/GCC/ARM_CM23/secure/secure_heap.c
index b3a7378..741b463 100644
--- a/portable/GCC/ARM_CM23/secure/secure_heap.c
+++ b/portable/GCC/ARM_CM23/secure/secure_heap.c
@@ -113,7 +113,8 @@
 /**

  * @brief Create a couple of list links to mark the start and end of the list.

  */

-static BlockLink_t xStart, * pxEnd = NULL;

+static BlockLink_t xStart;

+static BlockLink_t * pxEnd = NULL;

 

 /**

  * @brief Keeps track of the number of free bytes remaining, but says nothing

@@ -245,7 +246,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

 

     /* If this is the first call to malloc then the heap will require

diff --git a/portable/GCC/ARM_CM33/secure/secure_heap.c b/portable/GCC/ARM_CM33/secure/secure_heap.c
index b3a7378..741b463 100644
--- a/portable/GCC/ARM_CM33/secure/secure_heap.c
+++ b/portable/GCC/ARM_CM33/secure/secure_heap.c
@@ -113,7 +113,8 @@
 /**

  * @brief Create a couple of list links to mark the start and end of the list.

  */

-static BlockLink_t xStart, * pxEnd = NULL;

+static BlockLink_t xStart;

+static BlockLink_t * pxEnd = NULL;

 

 /**

  * @brief Keeps track of the number of free bytes remaining, but says nothing

@@ -245,7 +246,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

 

     /* If this is the first call to malloc then the heap will require

diff --git a/portable/GCC/ARM_CM55/secure/secure_heap.c b/portable/GCC/ARM_CM55/secure/secure_heap.c
index c633e2d..157fdbf 100644
--- a/portable/GCC/ARM_CM55/secure/secure_heap.c
+++ b/portable/GCC/ARM_CM55/secure/secure_heap.c
@@ -113,7 +113,8 @@
 /**
  * @brief Create a couple of list links to mark the start and end of the list.
  */
-static BlockLink_t xStart, * pxEnd = NULL;
+static BlockLink_t xStart;
+static BlockLink_t * pxEnd = NULL;
 
 /**
  * @brief Keeps track of the number of free bytes remaining, but says nothing
@@ -245,7 +246,9 @@
 
 void * pvPortMalloc( size_t xWantedSize )
 {
-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;
+    BlockLink_t * pxBlock;
+    BlockLink_t * pxPreviousBlock;
+    BlockLink_t * pxNewBlockLink;
     void * pvReturn = NULL;
 
     /* If this is the first call to malloc then the heap will require
diff --git a/portable/GCC/ARM_CM85/secure/secure_heap.c b/portable/GCC/ARM_CM85/secure/secure_heap.c
index b3a7378..741b463 100644
--- a/portable/GCC/ARM_CM85/secure/secure_heap.c
+++ b/portable/GCC/ARM_CM85/secure/secure_heap.c
@@ -113,7 +113,8 @@
 /**

  * @brief Create a couple of list links to mark the start and end of the list.

  */

-static BlockLink_t xStart, * pxEnd = NULL;

+static BlockLink_t xStart;

+static BlockLink_t * pxEnd = NULL;

 

 /**

  * @brief Keeps track of the number of free bytes remaining, but says nothing

@@ -245,7 +246,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

 

     /* If this is the first call to malloc then the heap will require

diff --git a/portable/GCC/MicroBlaze/port.c b/portable/GCC/MicroBlaze/port.c
index 48d661b..b1df8fb 100644
--- a/portable/GCC/MicroBlaze/port.c
+++ b/portable/GCC/MicroBlaze/port.c
@@ -88,7 +88,8 @@
  */

 StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )

 {

-extern void *_SDA2_BASE_, *_SDA_BASE_;

+extern void * _SDA2_BASE_;

+extern void * _SDA_BASE_;

 const uint32_t ulR2 = ( uint32_t ) &_SDA2_BASE_;

 const uint32_t ulR13 = ( uint32_t ) &_SDA_BASE_;

 

@@ -327,8 +328,3 @@
 	XTmrCtr_mSetControlStatusReg( XPAR_OPB_TIMER_1_BASEADDR, portCOUNTER_0, ulCSR );

 }

 /*-----------------------------------------------------------*/

-

-

-

-

-

diff --git a/portable/GCC/MicroBlazeV8/port.c b/portable/GCC/MicroBlazeV8/port.c
index 381702f..720c144 100644
--- a/portable/GCC/MicroBlazeV8/port.c
+++ b/portable/GCC/MicroBlazeV8/port.c
@@ -48,7 +48,7 @@
 nesting variable is initialised to a non-zero value. */

 #define portINITIAL_NESTING_VALUE	( 0xff )

 

-/* The bit within the MSR register that enabled/disables interrupts and 

+/* The bit within the MSR register that enabled/disables interrupts and

 exceptions respectively. */

 #define portMSR_IE					( 0x02U )

 #define portMSR_EE					( 0x100U )

@@ -106,7 +106,8 @@
  */

 StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )

 {

-extern void *_SDA2_BASE_, *_SDA_BASE_;

+extern void * _SDA2_BASE_;

+extern void * _SDA_BASE_;

 const uint32_t ulR2 = ( uint32_t ) &_SDA2_BASE_;

 const uint32_t ulR13 = ( uint32_t ) &_SDA_BASE_;

 

@@ -130,7 +131,7 @@
 	disabled.  Each task will enable interrupts automatically when it enters

 	the running state for the first time. */

 	*pxTopOfStack = mfmsr() & ~portMSR_IE;

-	

+

 	#if( MICROBLAZE_EXCEPTIONS_ENABLED == 1 )

 	{

 		/* Ensure exceptions are enabled for the task. */

@@ -449,5 +450,3 @@
 	return lStatus;

 }

 /*-----------------------------------------------------------*/

-

-

diff --git a/portable/GCC/MicroBlazeV9/port.c b/portable/GCC/MicroBlazeV9/port.c
index 7c605e0..4f54f99 100644
--- a/portable/GCC/MicroBlazeV9/port.c
+++ b/portable/GCC/MicroBlazeV9/port.c
@@ -111,7 +111,8 @@
 StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )

 #endif

 {

-extern void *_SDA2_BASE_, *_SDA_BASE_;

+extern void * _SDA2_BASE_;

+extern void * _SDA_BASE_;

 const uint32_t ulR2 = ( uint32_t ) &_SDA2_BASE_;

 const uint32_t ulR13 = ( uint32_t ) &_SDA_BASE_;

 extern void _start1( void );

@@ -487,5 +488,3 @@
 	return lStatus;

 }

 /*-----------------------------------------------------------*/

-

-

diff --git a/portable/IAR/ARM_CM23/secure/secure_heap.c b/portable/IAR/ARM_CM23/secure/secure_heap.c
index b3a7378..741b463 100644
--- a/portable/IAR/ARM_CM23/secure/secure_heap.c
+++ b/portable/IAR/ARM_CM23/secure/secure_heap.c
@@ -113,7 +113,8 @@
 /**

  * @brief Create a couple of list links to mark the start and end of the list.

  */

-static BlockLink_t xStart, * pxEnd = NULL;

+static BlockLink_t xStart;

+static BlockLink_t * pxEnd = NULL;

 

 /**

  * @brief Keeps track of the number of free bytes remaining, but says nothing

@@ -245,7 +246,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

 

     /* If this is the first call to malloc then the heap will require

diff --git a/portable/IAR/ARM_CM33/secure/secure_heap.c b/portable/IAR/ARM_CM33/secure/secure_heap.c
index b3a7378..741b463 100644
--- a/portable/IAR/ARM_CM33/secure/secure_heap.c
+++ b/portable/IAR/ARM_CM33/secure/secure_heap.c
@@ -113,7 +113,8 @@
 /**

  * @brief Create a couple of list links to mark the start and end of the list.

  */

-static BlockLink_t xStart, * pxEnd = NULL;

+static BlockLink_t xStart;

+static BlockLink_t * pxEnd = NULL;

 

 /**

  * @brief Keeps track of the number of free bytes remaining, but says nothing

@@ -245,7 +246,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

 

     /* If this is the first call to malloc then the heap will require

diff --git a/portable/IAR/ARM_CM55/secure/secure_heap.c b/portable/IAR/ARM_CM55/secure/secure_heap.c
index c633e2d..157fdbf 100644
--- a/portable/IAR/ARM_CM55/secure/secure_heap.c
+++ b/portable/IAR/ARM_CM55/secure/secure_heap.c
@@ -113,7 +113,8 @@
 /**
  * @brief Create a couple of list links to mark the start and end of the list.
  */
-static BlockLink_t xStart, * pxEnd = NULL;
+static BlockLink_t xStart;
+static BlockLink_t * pxEnd = NULL;
 
 /**
  * @brief Keeps track of the number of free bytes remaining, but says nothing
@@ -245,7 +246,9 @@
 
 void * pvPortMalloc( size_t xWantedSize )
 {
-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;
+    BlockLink_t * pxBlock;
+    BlockLink_t * pxPreviousBlock;
+    BlockLink_t * pxNewBlockLink;
     void * pvReturn = NULL;
 
     /* If this is the first call to malloc then the heap will require
diff --git a/portable/IAR/ARM_CM85/secure/secure_heap.c b/portable/IAR/ARM_CM85/secure/secure_heap.c
index b3a7378..741b463 100644
--- a/portable/IAR/ARM_CM85/secure/secure_heap.c
+++ b/portable/IAR/ARM_CM85/secure/secure_heap.c
@@ -113,7 +113,8 @@
 /**

  * @brief Create a couple of list links to mark the start and end of the list.

  */

-static BlockLink_t xStart, * pxEnd = NULL;

+static BlockLink_t xStart;

+static BlockLink_t * pxEnd = NULL;

 

 /**

  * @brief Keeps track of the number of free bytes remaining, but says nothing

@@ -245,7 +246,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

 

     /* If this is the first call to malloc then the heap will require

diff --git a/portable/MemMang/heap_2.c b/portable/MemMang/heap_2.c
index a22163e..124fe86 100644
--- a/portable/MemMang/heap_2.c
+++ b/portable/MemMang/heap_2.c
@@ -152,7 +152,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     PRIVILEGED_DATA static BaseType_t xHeapHasBeenInitialised = pdFALSE;

     void * pvReturn = NULL;

     size_t xAdditionalRequiredSize;

diff --git a/portable/MemMang/heap_4.c b/portable/MemMang/heap_4.c
index f61162a..2a594a6 100644
--- a/portable/MemMang/heap_4.c
+++ b/portable/MemMang/heap_4.c
@@ -123,7 +123,8 @@
 static const size_t xHeapStructSize = ( sizeof( BlockLink_t ) + ( ( size_t ) ( portBYTE_ALIGNMENT - 1 ) ) ) & ~( ( size_t ) portBYTE_ALIGNMENT_MASK );

 

 /* Create a couple of list links to mark the start and end of the list. */

-PRIVILEGED_DATA static BlockLink_t xStart, * pxEnd = NULL;

+PRIVILEGED_DATA static BlockLink_t xStart;

+PRIVILEGED_DATA static BlockLink_t * pxEnd = NULL;

 

 /* Keeps track of the number of calls to allocate and free memory as well as the

  * number of free bytes remaining, but says nothing about fragmentation. */

@@ -136,7 +137,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

     size_t xAdditionalRequiredSize;

 

diff --git a/portable/MemMang/heap_5.c b/portable/MemMang/heap_5.c
index c5d29d9..38953c5 100644
--- a/portable/MemMang/heap_5.c
+++ b/portable/MemMang/heap_5.c
@@ -141,7 +141,8 @@
 static const size_t xHeapStructSize = ( sizeof( BlockLink_t ) + ( ( size_t ) ( portBYTE_ALIGNMENT - 1 ) ) ) & ~( ( size_t ) portBYTE_ALIGNMENT_MASK );

 

 /* Create a couple of list links to mark the start and end of the list. */

-static BlockLink_t xStart, * pxEnd = NULL;

+static BlockLink_t xStart;

+static BlockLink_t * pxEnd = NULL;

 

 /* Keeps track of the number of calls to allocate and free memory as well as the

  * number of free bytes remaining, but says nothing about fragmentation. */

@@ -154,7 +155,9 @@
 

 void * pvPortMalloc( size_t xWantedSize )

 {

-    BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;

+    BlockLink_t * pxBlock;

+    BlockLink_t * pxPreviousBlock;

+    BlockLink_t * pxNewBlockLink;

     void * pvReturn = NULL;

     size_t xAdditionalRequiredSize;

 

@@ -441,7 +444,8 @@
 

 void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions )

 {

-    BlockLink_t * pxFirstFreeBlockInRegion = NULL, * pxPreviousFreeBlock;

+    BlockLink_t * pxFirstFreeBlockInRegion = NULL;

+    BlockLink_t * pxPreviousFreeBlock;

     portPOINTER_SIZE_TYPE xAlignedHeap;

     size_t xTotalRegionSize, xTotalHeapSize = 0;

     BaseType_t xDefinedRegions = 0;

diff --git a/portable/ThirdParty/GCC/Xtensa_ESP32/port.c b/portable/ThirdParty/GCC/Xtensa_ESP32/port.c
index 2e3831c..7675591 100644
--- a/portable/ThirdParty/GCC/Xtensa_ESP32/port.c
+++ b/portable/ThirdParty/GCC/Xtensa_ESP32/port.c
@@ -140,7 +140,8 @@
 #endif
 /* *INDENT-ON* */
 {
-    StackType_t * sp, * tp;
+    StackType_t * sp;
+    StackType_t * tp;
     XtExcFrame * frame;
 
     #if XCHAL_CP_NUM > 0
diff --git a/portable/ThirdParty/XCC/Xtensa/port.c b/portable/ThirdParty/XCC/Xtensa/port.c
index 5a6adde..6320ca2 100644
--- a/portable/ThirdParty/XCC/Xtensa/port.c
+++ b/portable/ThirdParty/XCC/Xtensa/port.c
@@ -67,7 +67,8 @@
 StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )

 #endif

 {

-    StackType_t * sp, * tp;

+    StackType_t * sp;

+    StackType_t * tp;

     XtExcFrame * frame;

 

     #if XCHAL_CP_NUM > 0

diff --git a/portable/oWatcom/16BitDOS/common/portcomn.c b/portable/oWatcom/16BitDOS/common/portcomn.c
index 38e6c0e..62fad75 100644
--- a/portable/oWatcom/16BitDOS/common/portcomn.c
+++ b/portable/oWatcom/16BitDOS/common/portcomn.c
@@ -28,8 +28,8 @@
 

 /*

 Changes from V1.00:

-	

-	+ pxPortInitialiseStack() now initialises the stack of new tasks to the 

+

+	+ pxPortInitialiseStack() now initialises the stack of new tasks to the

 	  same format used by the compiler.  This allows the compiler generated

 	  interrupt mechanism to be used for context switches.

 

@@ -43,7 +43,7 @@
 	+ usPortCheckFreeStackSpace() has been moved to tasks.c.

 */

 

-	

+

 

 #include <stdlib.h>

 #include "FreeRTOS.h"

@@ -53,9 +53,10 @@
 /* See header file for description. */

 StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )

 {

-StackType_t DS_Reg = 0, *pxOriginalSP;

+StackType_t DS_Reg = 0;

+StackType_t * pxOriginalSP;

 

-	/* Place a few bytes of known values on the bottom of the stack. 

+	/* Place a few bytes of known values on the bottom of the stack.

 	This is just useful for debugging. */

 

 	*pxTopOfStack = 0x1111;

@@ -74,9 +75,9 @@
 

 	/* We are going to start the scheduler using a return from interrupt

 	instruction to load the program counter, so first there would be the

-	status register and interrupt return address.  We make this the start 

+	status register and interrupt return address.  We make this the start

 	of the task. */

-	*pxTopOfStack = portINITIAL_SW; 

+	*pxTopOfStack = portINITIAL_SW;

 	pxTopOfStack--;

 	*pxTopOfStack = FP_SEG( pxCode );

 	pxTopOfStack--;

@@ -86,11 +87,11 @@
 	/* We are going to setup the stack for the new task to look like

 	the stack frame was setup by a compiler generated ISR.  We need to know

 	the address of the existing stack top to place in the SP register within

-	the stack frame.  pxOriginalSP holds SP before (simulated) pusha was 

+	the stack frame.  pxOriginalSP holds SP before (simulated) pusha was

 	called. */

 	pxOriginalSP = pxTopOfStack;

 

-	/* The remaining registers would be pushed on the stack by our context 

+	/* The remaining registers would be pushed on the stack by our context

 	switch function.  These are loaded with values simply to make debugging

 	easier. */

 	*pxTopOfStack = FP_OFF( pvParameters );		/* AX */

@@ -138,5 +139,3 @@
 	return pxTopOfStack;

 }

 /*-----------------------------------------------------------*/

-

-

diff --git a/tasks.c b/tasks.c
index e4c3dea..c7192e5 100644
--- a/tasks.c
+++ b/tasks.c
@@ -1346,7 +1346,9 @@
     eTaskState eTaskGetState( TaskHandle_t xTask )

     {

         eTaskState eReturn;

-        List_t const * pxStateList, * pxDelayedList, * pxOverflowedDelayedList;

+        List_t const * pxStateList;

+        List_t const * pxDelayedList;

+        List_t const * pxOverflowedDelayedList;

         const TCB_t * const pxTCB = xTask;

 

         configASSERT( pxTCB );

@@ -2352,7 +2354,9 @@
     static TCB_t * prvSearchForNameWithinSingleList( List_t * pxList,

                                                      const char pcNameToQuery[] )

     {

-        TCB_t * pxNextTCB, * pxFirstTCB, * pxReturn = NULL;

+        TCB_t * pxNextTCB;

+        TCB_t * pxFirstTCB;

+        TCB_t * pxReturn = NULL;

         UBaseType_t x;

         char cNextChar;

         BaseType_t xBreakLoop;

@@ -3815,7 +3819,8 @@
                                                      List_t * pxList,

                                                      eTaskState eState )

     {

-        configLIST_VOLATILE TCB_t * pxNextTCB, * pxFirstTCB;

+        configLIST_VOLATILE TCB_t * pxNextTCB;

+        configLIST_VOLATILE TCB_t * pxFirstTCB;

         UBaseType_t uxTask = 0;

 

         if( listCURRENT_LIST_LENGTH( pxList ) > ( UBaseType_t ) 0 )