This patch removes useless checks on 'prev' pointer, as it
is always set before with a valid value.
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
rx_pkts[nb_rx]->pkt_len += (uint32_t)(len[i]);
- if (prev)
- prev->next = rxm;
-
+ prev->next = rxm;
prev = rxm;
seg_res -= 1;
}
rx_pkts[nb_rx]->pkt_len += (uint32_t)(len[i]);
- if (prev)
- prev->next = rxm;
-
+ prev->next = rxm;
prev = rxm;
seg_res -= 1;
}
rx_pkts[nb_rx]->pkt_len += (uint32_t)(len[i]);
- if (prev)
- prev->next = rxm;
-
+ prev->next = rxm;
prev = rxm;
seg_res -= 1;
}
} else {
PMD_RX_LOG(ERR,
"No enough segments for packet.");
- if (prev)
- virtio_discard_rxbuf(vq, prev);
+ virtio_discard_rxbuf(vq, prev);
rxvq->stats.errors++;
break;
}