Skip to content

Commit 1a24f31

Browse files
Remove unused macro (#289)
* Remove unused macro * uncrustify
1 parent d2d9795 commit 1a24f31

File tree

1 file changed

+12
-25
lines changed

1 file changed

+12
-25
lines changed

FreeRTOS_TCP_IP.c

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,19 @@
7777
/*
7878
* A few values of the TCP options:
7979
*/
80-
#define tcpTCP_OPT_END 0U /**< End of TCP options list. */
81-
#define tcpTCP_OPT_NOOP 1U /**< "No-operation" TCP option. */
82-
#define tcpTCP_OPT_MSS 2U /**< Maximum segment size TCP option. */
83-
#define tcpTCP_OPT_WSOPT 3U /**< TCP Window Scale Option (3-byte long). */
84-
#define tcpTCP_OPT_SACK_P 4U /**< Advertise that SACK is permitted. */
85-
#define tcpTCP_OPT_SACK_A 5U /**< SACK option with first/last. */
86-
#define tcpTCP_OPT_TIMESTAMP 8U /**< Time-stamp option. */
80+
#define tcpTCP_OPT_END 0U /**< End of TCP options list. */
81+
#define tcpTCP_OPT_NOOP 1U /**< "No-operation" TCP option. */
82+
#define tcpTCP_OPT_MSS 2U /**< Maximum segment size TCP option. */
83+
#define tcpTCP_OPT_WSOPT 3U /**< TCP Window Scale Option (3-byte long). */
84+
#define tcpTCP_OPT_SACK_P 4U /**< Advertise that SACK is permitted. */
85+
#define tcpTCP_OPT_SACK_A 5U /**< SACK option with first/last. */
86+
#define tcpTCP_OPT_TIMESTAMP 8U /**< Time-stamp option. */
8787

8888

89-
#define tcpTCP_OPT_MSS_LEN 4U /**< Length of TCP MSS option. */
90-
#define tcpTCP_OPT_WSOPT_LEN 3U /**< Length of TCP WSOPT option. */
91-
92-
#define tcpTCP_OPT_TIMESTAMP_LEN 10 /**< fixed length of the time-stamp option. */
93-
94-
#ifndef ipconfigTCP_ACK_EARLIER_PACKET
95-
#define ipconfigTCP_ACK_EARLIER_PACKET 1 /**< Acknowledge an earlier packet. */
96-
#endif
89+
#define tcpTCP_OPT_MSS_LEN 4U /**< Length of TCP MSS option. */
90+
#define tcpTCP_OPT_WSOPT_LEN 3U /**< Length of TCP WSOPT option. */
9791

92+
#define tcpTCP_OPT_TIMESTAMP_LEN 10 /**< fixed length of the time-stamp option. */
9893

9994
/** @brief
10095
* The macro tcpNOW_CONNECTED() is use to determine if the connection makes a
@@ -3035,11 +3030,7 @@
30353030
uint32_t ulRxBufferSpace;
30363031

30373032
#if ( ipconfigUSE_TCP_WIN == 1 )
3038-
#if ( ipconfigTCP_ACK_EARLIER_PACKET == 0 )
3039-
const int32_t lMinLength = 0;
3040-
#else
3041-
int32_t lMinLength;
3042-
#endif
3033+
int32_t lMinLength;
30433034
#endif
30443035

30453036
/* Set the time-out field, so that we'll be called by the IP-task in case no
@@ -3049,11 +3040,7 @@
30493040

30503041
#if ipconfigUSE_TCP_WIN == 1
30513042
{
3052-
#if ( ipconfigTCP_ACK_EARLIER_PACKET != 0 )
3053-
{
3054-
lMinLength = ( ( int32_t ) 2 ) * ( ( int32_t ) pxSocket->u.xTCP.usCurMSS );
3055-
}
3056-
#endif /* ipconfigTCP_ACK_EARLIER_PACKET */
3043+
lMinLength = ( ( int32_t ) 2 ) * ( ( int32_t ) pxSocket->u.xTCP.usCurMSS );
30573044

30583045
/* In case we're receiving data continuously, we might postpone sending
30593046
* an ACK to gain performance. */

0 commit comments

Comments
 (0)