Skip to content

Commit

Permalink
MISRA fix 21.15
Browse files Browse the repository at this point in the history
  • Loading branch information
moninom1 committed Nov 24, 2023
1 parent 475e51b commit fc00478
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/FreeRTOS_ARP.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ static TickType_t xLastGratuitousARPTime = 0U;

if( ulTargetProtocolAddress == pxTargetEndPoint->ipv4_settings.ulIPAddress )
{
if( memcmp( ( void * ) pxTargetEndPoint->xMACAddress.ucBytes,
( pxARPHeader->xSenderHardwareAddress.ucBytes ),
if( memcmp( pxTargetEndPoint->xMACAddress.ucBytes,
pxARPHeader->xSenderHardwareAddress.ucBytes,
ipMAC_ADDRESS_LENGTH_BYTES ) != 0 )
{
vARPProcessPacketRequest( pxARPFrame, pxTargetEndPoint, ulSenderProtocolAddress );
Expand All @@ -310,9 +310,9 @@ static TickType_t xLastGratuitousARPTime = 0U;

/* Make sure target MAC address is either ff:ff:ff:ff:ff:ff or 00:00:00:00:00:00 and senders MAC
* address is not matching with the endpoint MAC address. */
if( ( ( memcmp( ( const void * ) pxARPHeader->xTargetHardwareAddress.ucBytes, xBroadcastMACAddress.ucBytes, ipMAC_ADDRESS_LENGTH_BYTES ) == 0 ) ||
( ( memcmp( ( const void * ) pxARPHeader->xTargetHardwareAddress.ucBytes, xGARPTargetAddress.ucBytes, ipMAC_ADDRESS_LENGTH_BYTES ) == 0 ) ) ) &&
( memcmp( ( void * ) pxTargetEndPoint->xMACAddress.ucBytes, ( pxARPHeader->xSenderHardwareAddress.ucBytes ), ipMAC_ADDRESS_LENGTH_BYTES ) != 0 ) )
if( ( ( memcmp( pxARPHeader->xTargetHardwareAddress.ucBytes, xBroadcastMACAddress.ucBytes, ipMAC_ADDRESS_LENGTH_BYTES ) == 0 ) ||
( ( memcmp( pxARPHeader->xTargetHardwareAddress.ucBytes, xGARPTargetAddress.ucBytes, ipMAC_ADDRESS_LENGTH_BYTES ) == 0 ) ) ) &&
( memcmp( pxTargetEndPoint->xMACAddress.ucBytes, pxARPHeader->xSenderHardwareAddress.ucBytes, ipMAC_ADDRESS_LENGTH_BYTES ) != 0 ) )
{
MACAddress_t xHardwareAddress;
NetworkEndPoint_t * pxCachedEndPoint;
Expand Down

0 comments on commit fc00478

Please sign in to comment.