mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-27 06:14:09 +00:00
Code cleanup: add some parentheses in tcp.c and tcp_out.c
This commit is contained in:
parent
4b091cfc2a
commit
e8d5499d72
@ -1301,7 +1301,7 @@ tcp_process_refused_data(struct tcp_pcb *pcb)
|
||||
TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err);
|
||||
if (err == ERR_OK) {
|
||||
/* did refused_data include a FIN? */
|
||||
if (refused_flags & PBUF_FLAG_TCP_FIN
|
||||
if ((refused_flags & PBUF_FLAG_TCP_FIN)
|
||||
#if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE
|
||||
&& (rest == NULL)
|
||||
#endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */
|
||||
@ -1826,9 +1826,9 @@ tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb)
|
||||
tcp_pcb_purge(pcb);
|
||||
|
||||
/* if there is an outstanding delayed ACKs, send it */
|
||||
if (pcb->state != TIME_WAIT &&
|
||||
pcb->state != LISTEN &&
|
||||
pcb->flags & TF_ACK_DELAY) {
|
||||
if ((pcb->state != TIME_WAIT) &&
|
||||
(pcb->state != LISTEN) &&
|
||||
(pcb->flags & TF_ACK_DELAY)) {
|
||||
pcb->flags |= TF_ACK_NOW;
|
||||
tcp_output(pcb);
|
||||
}
|
||||
|
@ -1014,9 +1014,9 @@ tcp_output(struct tcp_pcb *pcb)
|
||||
*
|
||||
* If data is to be sent, we will just piggyback the ACK (see below).
|
||||
*/
|
||||
if (pcb->flags & TF_ACK_NOW &&
|
||||
(seg == NULL ||
|
||||
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) {
|
||||
if ((pcb->flags & TF_ACK_NOW) &&
|
||||
(seg == NULL ||
|
||||
lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) {
|
||||
return tcp_send_empty_ack(pcb);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user