@@ -572,10 +572,9 @@ static BaseType_t prvDetermineSocketSize( BaseType_t xDomain,
572572 {
573573 uint16_t usDifference = ipSIZE_OF_IPv6_HEADER - ipSIZE_OF_IPv4_HEADER ;
574574
575- if ( pxSocket -> u .xTCP .usMSS > usDifference )
576- {
577- pxSocket -> u .xTCP .usMSS = ( uint16_t ) ( pxSocket -> u .xTCP .usMSS - usDifference );
578- }
575+ /* Because ipconfigTCP_MSS is guaranteed not less than tcpMINIMUM_SEGMENT_LENGTH by FreeRTOSIPConfigDefaults.h,
576+ * it's unnecessary to check if xSocket->u.xTCP.usMSS is greater than difference. */
577+ pxSocket -> u .xTCP .usMSS = ( uint16_t ) ( pxSocket -> u .xTCP .usMSS - usDifference );
579578 }
580579 #endif /* ipconfigUSE_IPv6 != 0 */
581580
@@ -1259,8 +1258,7 @@ static int32_t prvRecvFrom_CopyPacket( uint8_t * pucEthernetBuffer,
12591258 * (24-bytes) for compatibility.
12601259 *
12611260 * @return The number of bytes received. Or else, an error code is returned. When it
1262- * returns a negative value, the cause can be looked-up in
1263- * 'FreeRTOS_errno_TCP.h'.
1261+ * returns a negative value, the cause can be looked-up in 'FreeRTOS-Kernel/projdefs.h'.
12641262 */
12651263int32_t FreeRTOS_recvfrom ( const ConstSocket_t xSocket ,
12661264 void * pvBuffer ,
@@ -1570,7 +1568,7 @@ static int32_t prvSendTo_ActualSend( const FreeRTOS_Socket_t * pxSocket,
15701568 * Berkeley sockets standard. Else, it is not used.
15711569 *
15721570 * @return When positive: the total number of bytes sent, when negative an error
1573- * has occurred: it can be looked-up in 'FreeRTOS_errno_TCP .h'.
1571+ * has occurred: it can be looked-up in 'FreeRTOS-Kernel/projdefs .h'.
15741572 */
15751573int32_t FreeRTOS_sendto ( Socket_t xSocket ,
15761574 const void * pvBuffer ,
0 commit comments