The function strerror() is insecure in a multi-thread environment.
This patch uses rte_strerror() to replace it.
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -1170,7 +1170,7 @@ dpaa2_eth_setup_irqs(struct rte_eth_dev *dev, int enable)
irq_index, mask);
if (err < 0) {
DPAA2_PMD_ERR("Error: dpni_set_irq_mask():%d (%s)", err,
- strerror(-err));
+ rte_strerror(-err));
return err;
}
@@ -1178,7 +1178,7 @@ dpaa2_eth_setup_irqs(struct rte_eth_dev *dev, int enable)
irq_index, enable);
if (err < 0)
DPAA2_PMD_ERR("Error: dpni_set_irq_enable():%d (%s)", err,
- strerror(-err));
+ rte_strerror(-err));
return err;
}