From 6ef69ece95015d38f98acd144ef5811eb43a861b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 7 Oct 2009 18:04:24 +0000 Subject: [PATCH] patch #6930: [PATCH trivial] TCP_RMV remove unnecessary check - removed two checks for NULL which are not necessary. --- src/include/lwip/tcp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index 2efa0860..4b5823ff 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -651,7 +651,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */ if(*pcbs == npcb) { \ *pcbs = (*pcbs)->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; \ break; \ } \ @@ -679,7 +679,7 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */ 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; \ break; \ } \