Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions FreeRTOS_IP.c
Original file line number Diff line number Diff line change
Expand Up @@ -1997,13 +1997,11 @@ static eFrameProcessingResult_t prvAllowIPPacket( const IPPacket_t * const pxIPP
if( pxIPPacket->xIPHeader.ucProtocol == ( uint8_t ) ipPROTOCOL_UDP )
{
ProtocolPacket_t * pxProtPack;
const uint16_t * pusChecksum;

/* pxProtPack will point to the offset were the protocols begin. */
pxProtPack = ipCAST_PTR_TO_TYPE_PTR( ProtocolPacket_t, &( pxNetworkBuffer->pucEthernetBuffer[ uxHeaderLength - ipSIZE_OF_IPv4_HEADER ] ) );
pusChecksum = ( const uint16_t * ) ( &( pxProtPack->xUDPPacket.xUDPHeader.usChecksum ) );

if( *pusChecksum == ( uint16_t ) 0U )
if( pxProtPack->xUDPPacket.xUDPHeader.usChecksum == ( uint16_t ) 0U )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a welcome change, because usChecksum is a member of a packed struct.

{
#if ( ipconfigHAS_PRINTF != 0 )
{
Expand Down
2 changes: 1 addition & 1 deletion tools/tcp_utilities/tcp_mem_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

#ifndef ipconfigTCP_MEM_STATS_MAX_ALLOCATION
#define ipconfigTCP_MEM_STATS_MAX_ALLOCATION 128u
#pragma warning "ipconfigTCP_MEM_STATS_MAX_ALLOCATION undefined?"
#pragma message ("ipconfigTCP_MEM_STATS_MAX_ALLOCATION undefined?")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is nice, this works for both Visual Studio and for GCC.

#endif

#if ( ipconfigUSE_TCP_MEM_STATS != 0 )
Expand Down