From: Pavan Nikhilesh <pbhagavat...@marvell.com> Use rte_rand() instead of random() for better randomness.
Coverity Issue: 337666 Signed-off-by: Pavan Nikhilesh <pbhagavat...@marvell.com> --- app/test-pmd/txonly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index 539043c34..3caf281cb 100644 --- a/app/test-pmd/txonly.c +++ b/app/test-pmd/txonly.c @@ -159,7 +159,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp, uint8_t i; if (unlikely(tx_pkt_split == TX_PKT_SPLIT_RND)) - nb_segs = random() % tx_pkt_nb_segs + 1; + nb_segs = rte_rand() % tx_pkt_nb_segs + 1; else nb_segs = tx_pkt_nb_segs; -- 2.17.1