mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 09:17:44 -04:00
TCP: Address MISRA rule 11.3 violations (Part 2) (#227)
This commit is contained in:
parent
bcd5dec6c4
commit
7cb57324fd
4 changed files with 77 additions and 41 deletions
|
@ -82,7 +82,7 @@ uint32_t ulIPAddress = pxNetworkBuffer->ulIPAddress;
|
|||
size_t uxPayloadSize;
|
||||
|
||||
/* Map the UDP packet onto the start of the frame. */
|
||||
pxUDPPacket = ipPOINTER_CAST( UDPPacket_t *, pxNetworkBuffer->pucEthernetBuffer );
|
||||
pxUDPPacket = ipCAST_PTR_TO_TYPE_PTR( UDPPacket_t, pxNetworkBuffer->pucEthernetBuffer );
|
||||
|
||||
#if ipconfigSUPPORT_OUTGOING_PINGS == 1
|
||||
if( pxNetworkBuffer->usPort == ( uint16_t ) ipPACKET_CONTAINS_ICMP_DATA )
|
||||
|
@ -258,7 +258,7 @@ configASSERT( pxNetworkBuffer != NULL );
|
|||
configASSERT( pxNetworkBuffer->pucEthernetBuffer != NULL );
|
||||
|
||||
/* Map the ethernet buffer to the UDPPacket_t struct for easy access to the fields. */
|
||||
const UDPPacket_t *pxUDPPacket = ipPOINTER_CAST( const UDPPacket_t *, pxNetworkBuffer->pucEthernetBuffer );
|
||||
const UDPPacket_t *pxUDPPacket = ipCAST_CONST_PTR_TO_CONST_TYPE_PTR( UDPPacket_t, pxNetworkBuffer->pucEthernetBuffer );
|
||||
|
||||
/* Caller must check for minimum packet size. */
|
||||
pxSocket = pxUDPSocketLookup( usPort );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue