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/ice/ice_testpmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -61,7 +61,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);
@@ -128,7 +128,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);