1
0
mirror of https://github.com/FreeRTOS/FreeRTOS-Plus-TCP synced 2025-10-23 01:18:54 +08:00

Misra check fix and update (#476)

* Misra check fix and update
This commit is contained in:
xuelix
2022-06-06 17:47:09 -07:00
committed by GitHub
parent ab3d0fa100
commit 4fb9674de0
25 changed files with 231 additions and 222 deletions

View File

@@ -1426,8 +1426,8 @@ static eFrameProcessingResult_t prvAllowIPPacket( const IPPacket_t * const pxIPP
* packet may cause network storms. Drop the packet. */
eReturn = eReleaseBuffer;
}
else if( ( memcmp( ( const void * ) xBroadcastMACAddress.ucBytes,
( const void * ) ( pxIPPacket->xEthernetHeader.xDestinationAddress.ucBytes ),
else if( ( memcmp( xBroadcastMACAddress.ucBytes,
pxIPPacket->xEthernetHeader.xDestinationAddress.ucBytes,
sizeof( MACAddress_t ) ) == 0 ) &&
( ( FreeRTOS_ntohl( ulDestinationIPAddress ) & 0xffU ) != 0xffU ) )
{
@@ -1435,8 +1435,8 @@ static eFrameProcessingResult_t prvAllowIPPacket( const IPPacket_t * const pxIPP
* broadcast address. */
eReturn = eReleaseBuffer;
}
else if( memcmp( ( void * ) &xBroadcastMACAddress,
( void * ) &( pxIPPacket->xEthernetHeader.xSourceAddress ),
else if( memcmp( xBroadcastMACAddress.ucBytes,
pxIPPacket->xEthernetHeader.xSourceAddress.ucBytes,
sizeof( MACAddress_t ) ) == 0 )
{
/* Ethernet source is a broadcast address. Drop the packet. */