lwiperf: Simplify #if LWIPERF_CHECK_RX_DATA guard

The variable i is equal to q->len after exit the for loop.
Check the received data should not change the logic of update packet_idx.
So let's simplify the code a bit.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
Axel Lin 2016-12-06 09:01:43 +08:00 committed by goldsimon
parent cc25c2634b
commit 795acf020e

View File

@ -494,10 +494,8 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)
return ERR_VAL; return ERR_VAL;
} }
} }
packet_idx += i;
#else
packet_idx += q->len;
#endif #endif
packet_idx += q->len;
} }
LWIP_ASSERT("count mismatch", packet_idx == p->tot_len); LWIP_ASSERT("count mismatch", packet_idx == p->tot_len);
conn->bytes_transferred += packet_idx; conn->bytes_transferred += packet_idx;