From: Yong Wang Date: Mon, 9 Jan 2017 13:48:52 +0000 (-0500) Subject: net/i40e: remove redundant statement and braces X-Git-Tag: spdx-start~4838 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4ce5a5d2f1a9cc73e6f545cd3df4f94f8bb76872;p=dpdk.git net/i40e: remove redundant statement and braces In function "reassemble_packets()", the statement "end = secondlast;" is redundant since there is another assignment "start = end = NULL;" 3 lines below. BTW, I removed the redundant braces in the conditional statement "if (end->data_len > rxq->crc_len)". Signed-off-by: Yong Wang Acked-by: Ferruh Yigit --- diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h index 990520f3c1..374555896d 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_common.h +++ b/drivers/net/i40e/i40e_rxtx_vec_common.h @@ -65,9 +65,9 @@ reassemble_packets(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_bufs, start->ol_flags = end->ol_flags; /* we need to strip crc for the whole packet */ start->pkt_len -= rxq->crc_len; - if (end->data_len > rxq->crc_len) { + if (end->data_len > rxq->crc_len) end->data_len -= rxq->crc_len; - } else { + else { /* free up last mbuf */ struct rte_mbuf *secondlast = start; @@ -78,7 +78,6 @@ reassemble_packets(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_bufs, end->data_len); secondlast->next = NULL; rte_pktmbuf_free_seg(end); - end = secondlast; } pkts[pkt_idx++] = start; start = end = NULL;