[v4,29/42] net/ice: use rte strerror

Message ID 20241023082852.2780488-30-huangdengdui@huawei.com (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers
Series replace strerror |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

huangdengdui Oct. 23, 2024, 8:28 a.m. UTC
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(-)
  

Patch

diff --git a/drivers/net/ice/ice_testpmd.c b/drivers/net/ice/ice_testpmd.c
index 98c02d68c6..25e3d63163 100644
--- a/drivers/net/ice/ice_testpmd.c
+++ b/drivers/net/ice/ice_testpmd.c
@@ -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);