mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 03:14:04 +00:00
patch #6930: [PATCH trivial] TCP_RMV remove unnecessary check - removed two checks for NULL which are not necessary.
This commit is contained in:
parent
a9cbdc141b
commit
6ef69ece95
@ -651,7 +651,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
|
|||||||
if(*pcbs == npcb) { \
|
if(*pcbs == npcb) { \
|
||||||
*pcbs = (*pcbs)->next; \
|
*pcbs = (*pcbs)->next; \
|
||||||
} else for(tcp_tmp_pcb = *pcbs; tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
} else for(tcp_tmp_pcb = *pcbs; tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
||||||
if(tcp_tmp_pcb->next != NULL && tcp_tmp_pcb->next == npcb) { \
|
if(tcp_tmp_pcb->next == npcb) { \
|
||||||
tcp_tmp_pcb->next = npcb->next; \
|
tcp_tmp_pcb->next = npcb->next; \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
@ -679,7 +679,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
|
|||||||
for(tcp_tmp_pcb = *pcbs; \
|
for(tcp_tmp_pcb = *pcbs; \
|
||||||
tcp_tmp_pcb != NULL; \
|
tcp_tmp_pcb != NULL; \
|
||||||
tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
||||||
if(tcp_tmp_pcb->next != NULL && tcp_tmp_pcb->next == npcb) { \
|
if(tcp_tmp_pcb->next == npcb) { \
|
||||||
tcp_tmp_pcb->next = npcb->next; \
|
tcp_tmp_pcb->next = npcb->next; \
|
||||||
break; \
|
break; \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user