mirror of
				https://github.com/FreeRTOS/FreeRTOS-Kernel.git
				synced 2025-11-04 11:09:01 +01:00 
			
		
		
		
	Not to use object modified in the loop body (#861)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal> Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									09c4c4bae9
								
							
						
					
					
						commit
						ac4313560f
					
				
							
								
								
									
										14
									
								
								tasks.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								tasks.c
									
									
									
									
									
								
							@ -7231,7 +7231,7 @@ static void prvResetNextTaskUnblockTime( void )
 | 
			
		||||
            uxArraySize = uxTaskGetSystemState( pxTaskStatusArray, uxArraySize, NULL );
 | 
			
		||||
 | 
			
		||||
            /* Create a human readable table from the binary data. */
 | 
			
		||||
            for( x = 0; ( x < uxArraySize ) && ( xOutputBufferFull == pdFALSE ); x++ )
 | 
			
		||||
            for( x = 0; x < uxArraySize; x++ )
 | 
			
		||||
            {
 | 
			
		||||
                switch( pxTaskStatusArray[ x ].eCurrentState )
 | 
			
		||||
                {
 | 
			
		||||
@ -7310,6 +7310,11 @@ static void prvResetNextTaskUnblockTime( void )
 | 
			
		||||
                {
 | 
			
		||||
                    xOutputBufferFull = pdTRUE;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if( xOutputBufferFull == pdTRUE )
 | 
			
		||||
                {
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            /* Free the array again.  NOTE!  If configSUPPORT_DYNAMIC_ALLOCATION
 | 
			
		||||
@ -7391,7 +7396,7 @@ static void prvResetNextTaskUnblockTime( void )
 | 
			
		||||
            if( ulTotalTime > 0UL )
 | 
			
		||||
            {
 | 
			
		||||
                /* Create a human readable table from the binary data. */
 | 
			
		||||
                for( x = 0; ( x < uxArraySize ) && ( xOutputBufferFull == pdFALSE ); x++ )
 | 
			
		||||
                for( x = 0; x < uxArraySize; x++ )
 | 
			
		||||
                {
 | 
			
		||||
                    /* What percentage of the total run time has the task used?
 | 
			
		||||
                     * This will always be rounded down to the nearest integer.
 | 
			
		||||
@ -7472,6 +7477,11 @@ static void prvResetNextTaskUnblockTime( void )
 | 
			
		||||
                    {
 | 
			
		||||
                        xOutputBufferFull = pdTRUE;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    if( xOutputBufferFull == pdTRUE )
 | 
			
		||||
                    {
 | 
			
		||||
                        break;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user