The function strerror() is insecure in a multi-thread environment.
This patch uses rte_strerror() to replace it.

Cc: sta...@dpdk.org

Signed-off-by: Dengdui Huang <huangdeng...@huawei.com>
Acked-by: Chengwen Feng <fengcheng...@huawei.com>
---
 drivers/net/ice/ice_testpmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_testpmd.c b/drivers/net/ice/ice_testpmd.c
index a7a8d0c53c..e1392059e0 100644
--- a/drivers/net/ice/ice_testpmd.c
+++ b/drivers/net/ice/ice_testpmd.c
@@ -60,7 +60,7 @@ cmd_ddp_dump_parsed(void *parsed_result,
                default:
                        fprintf(stderr,
                                "Failed to dump DDP runtime configure,"
-                               " error: (%s)\n", strerror(-ret));
+                               " error: (%s)\n", rte_strerror(-ret));
                }
        }
        free(buff);
@@ -127,7 +127,7 @@ cmd_ddp_dump_switch_parsed(void *parsed_result,
                default:
                        fprintf(stderr,
                                "Failed to dump DDP switch runtime configure,"
-                               " error: (%s)\n", strerror(-ret));
+                               " error: (%s)\n", rte_strerror(-ret));
                }
        }
        free(buff);
-- 
2.33.0

Reply via email to