mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-16 01:37:45 -04:00
Address various MISRA warnings v3 (#240)
* Add a branch and make MISRA changes * initialize the value * Update after Gary's comments
This commit is contained in:
parent
cacf4ad7f9
commit
05b4d4fc64
3 changed files with 16 additions and 9 deletions
|
@ -801,7 +801,7 @@ const int32_t l500ms = 500;
|
|||
|
||||
int32_t lTCPWindowRxCheck( TCPWindow_t *pxWindow, uint32_t ulSequenceNumber, uint32_t ulLength, uint32_t ulSpace )
|
||||
{
|
||||
uint32_t ulCurrentSequenceNumber, ulLast, ulSavedSequenceNumber;
|
||||
uint32_t ulCurrentSequenceNumber, ulLast, ulSavedSequenceNumber, ulSequenceNumberDiff;
|
||||
int32_t lReturn, lDistance;
|
||||
TCPSegment_t *pxFound;
|
||||
|
||||
|
@ -909,9 +909,10 @@ const int32_t l500ms = 500;
|
|||
/* An "out-of-sequence" segment was received, must have missed one.
|
||||
Prepare a SACK (Selective ACK). */
|
||||
ulLast = ulSequenceNumber + ulLength;
|
||||
/* The cast from unsigned long to signed long is on purpose.
|
||||
The macro 'ipNUMERIC_CAST' will prevent PC-lint from complaining. */
|
||||
lDistance = ipNUMERIC_CAST( int32_t, ulLast - ulCurrentSequenceNumber );
|
||||
|
||||
ulSequenceNumberDiff = ulLast - ulCurrentSequenceNumber;
|
||||
/* The cast from unsigned long to signed long is on purpose. */
|
||||
lDistance = ( int32_t ) ulSequenceNumberDiff;
|
||||
|
||||
if( lDistance <= 0 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue