Address various MISRA warnings v2 (#238)

* Address some MISRA warnings

* Change the return type

* Update FreeRTOS_Sockets.c
This commit is contained in:
Aniruddha Kanhere 2020-09-02 15:37:44 -07:00 committed by GitHub
parent 0341050048
commit cacf4ad7f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 14 deletions

View file

@ -1883,7 +1883,7 @@ const socklen_t uxSize = 16;
{
uint8_t pucDigits[ sockDIGIT_COUNT ];
uint8_t ucValue = pucAddress[ uxNibble ];
socklen_t uxSource = sockDIGIT_COUNT - 1U;
socklen_t uxSource = ( socklen_t ) sockDIGIT_COUNT - ( socklen_t ) 1U;
socklen_t uxNeeded;
for( ;; )
@ -1899,7 +1899,7 @@ const socklen_t uxSize = 16;
pucDigits[ 0 ] = ucValue;
/* Skip leading zeros. */
for( uxSource = 0; uxSource < ( socklen_t ) ( sockDIGIT_COUNT - 1U ); uxSource++ )
for( uxSource = 0; uxSource < ( ( socklen_t ) sockDIGIT_COUNT - ( socklen_t ) 1U ); uxSource++ )
{
if( pucDigits[ uxSource ] != 0U )
{