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/qede/qede_regs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -221,7 +221,7 @@ qede_write_fwdump(const char *dump_file, void *dump, size_t len)
if (!f) {
fprintf(stderr, "Can't open file %s: %s\n",
- dump_file, strerror(errno));
+ dump_file, rte_strerror(errno));
return 1;
}
bytes = fwrite(dump, 1, len, f);
@@ -234,7 +234,7 @@ qede_write_fwdump(const char *dump_file, void *dump, size_t len)
if (fclose(f)) {
fprintf(stderr, "Can't close file %s: %s\n",
- dump_file, strerror(errno));
+ dump_file, rte_strerror(errno));
err = 1;
}