From fc004780a1d875287b8a4f0e83199463de084955 Mon Sep 17 00:00:00 2001 From: Monika Singh Date: Fri, 24 Nov 2023 10:18:42 +0000 Subject: [PATCH] MISRA fix 21.15 --- source/FreeRTOS_ARP.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/FreeRTOS_ARP.c b/source/FreeRTOS_ARP.c index cc24dbfb79..43dc34fe7f 100644 --- a/source/FreeRTOS_ARP.c +++ b/source/FreeRTOS_ARP.c @@ -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 ); @@ -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;