Skip to content

Commit 0a60400

Browse files
committed
Address PR comments
1 parent cc52549 commit 0a60400

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

source/FreeRTOS_DNS.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,8 @@
735735
#if defined( _lint ) || defined( __COVERITY__ )
736736
( void ) pxTail;
737737
#else
738-
vSetField16( pxTail, DNSTail_t, usType, dnsTYPE_A_HOST )
739-
vSetField16( pxTail, DNSTail_t, usClass, dnsCLASS_IN )
738+
vSetField16( pxTail, DNSTail_t, usType, dnsTYPE_A_HOST );
739+
vSetField16( pxTail, DNSTail_t, usClass, dnsCLASS_IN );
740740
#endif
741741

742742
/* Return the total size of the generated message, which is the space from

source/FreeRTOS_IP_Utils.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,22 +97,22 @@
9797
/**
9898
* Used in checksum calculation.
9999
*/
100-
typedef union xUnion32_t
100+
typedef union xUnion32
101101
{
102102
uint32_t u32; /**< The 32-bit member of the union. */
103103
uint16_t u16[ 2 ]; /**< The array of 2 16-bit members of the union. */
104104
uint8_t u8[ 4 ]; /**< The array of 4 8-bit members of the union. */
105-
} xUnion32;
105+
} xUnion32_t;
106106

107107
/**
108108
* Used in checksum calculation.
109109
*/
110-
typedef union xUnionPtr_t
110+
typedef union xUnionPtr
111111
{
112112
const uint32_t * u32ptr; /**< The pointer member to a 32-bit variable. */
113113
const uint16_t * u16ptr; /**< The pointer member to a 16-bit variable. */
114114
const uint8_t * u8ptr; /**< The pointer member to an 8-bit variable. */
115-
} xUnionPtr;
115+
} xUnionPtr_t;
116116

117117
/*
118118
* Returns the network buffer descriptor that owns a given packet buffer.
@@ -830,10 +830,10 @@ uint16_t usGenerateChecksum( uint16_t usSum,
830830
{
831831
/* MISRA/PC-lint doesn't like the use of unions. Here, they are a great
832832
* aid though to optimise the calculations. */
833-
xUnion32 xSum2;
834-
xUnion32 xSum;
835-
xUnion32 xTerm;
836-
xUnionPtr xSource;
833+
xUnion32_t xSum2;
834+
xUnion32_t xSum;
835+
xUnion32_t xTerm;
836+
xUnionPtr_t xSource;
837837
uintptr_t uxAlignBits;
838838
uint32_t ulCarry = 0U;
839839
uint16_t usTemp;

source/FreeRTOS_TCP_IP.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,6 @@
662662
usRemotePort = FreeRTOS_htons( pxProtocolHeaders->xTCPHeader.usSourcePort );
663663
ulSequenceNumber = FreeRTOS_ntohl( pxProtocolHeaders->xTCPHeader.ulSequenceNumber );
664664
ulAckNumber = FreeRTOS_ntohl( pxProtocolHeaders->xTCPHeader.ulAckNr );
665-
xResult = pdPASS;
666665

667666
/* Check for a minimum packet size. */
668667
if( pxNetworkBuffer->xDataLength < ( ipSIZE_OF_ETH_HEADER + xIPHeaderSize( pxNetworkBuffer ) + ipSIZE_OF_TCP_HEADER ) )

source/FreeRTOS_UDP_IP.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ BaseType_t xProcessReceivedUDPPacket( NetworkBufferDescriptor_t * pxNetworkBuffe
310310
{
311311
BaseType_t xReturn = pdPASS;
312312
FreeRTOS_Socket_t * pxSocket;
313-
UDPPacket_t * pxUDPPacket;
313+
const UDPPacket_t * pxUDPPacket;
314314

315315
configASSERT( pxNetworkBuffer != NULL );
316316
configASSERT( pxNetworkBuffer->pucEthernetBuffer != NULL );

source/include/FreeRTOS_IP_Private.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,10 @@ extern const BaseType_t xBufferAllocFixedSize;
400400
#define SOCKET_EVENT_BIT_COUNT 8
401401

402402
#define vSetField16( pxBase, xType, xField, usValue ) \
403-
{ \
403+
do { \
404404
( ( uint8_t * ) ( pxBase ) )[ offsetof( xType, xField ) + 0 ] = ( uint8_t ) ( ( usValue ) >> 8 ); \
405405
( ( uint8_t * ) ( pxBase ) )[ offsetof( xType, xField ) + 1 ] = ( uint8_t ) ( ( usValue ) & 0xffU ); \
406-
}
406+
} while( ipFALSE_BOOL )
407407

408408
#define vSetField32( pxBase, xType, xField, ulValue ) \
409409
{ \

0 commit comments

Comments
 (0)