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>
Acked-by: Morten Brørup <m...@smartsharesystems.com>
---
 drivers/net/ixgbe/ixgbe_testpmd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_testpmd.c 
b/drivers/net/ixgbe/ixgbe_testpmd.c
index e0d161eafe..3c6d648844 100644
--- a/drivers/net/ixgbe/ixgbe_testpmd.c
+++ b/drivers/net/ixgbe/ixgbe_testpmd.c
@@ -141,7 +141,7 @@ cmd_set_vf_split_drop_en_parsed(void *parsed_result,
                fprintf(stderr, "not supported on port %d\n", res->port_id);
                break;
        default:
-               fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
+               fprintf(stderr, "programming error: (%s)\n", 
rte_strerror(-ret));
        }
 }
 
@@ -243,7 +243,7 @@ cmd_set_macsec_offload_on_parsed(void *parsed_result,
                fprintf(stderr, "not supported on port %d\n", port_id);
                break;
        default:
-               fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
+               fprintf(stderr, "programming error: (%s)\n", 
rte_strerror(-ret));
        }
 }
 
@@ -327,7 +327,7 @@ cmd_set_macsec_offload_off_parsed(void *parsed_result,
                fprintf(stderr, "not supported on port %d\n", port_id);
                break;
        default:
-               fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
+               fprintf(stderr, "programming error: (%s)\n", 
rte_strerror(-ret));
        }
 }
 
@@ -402,7 +402,7 @@ cmd_set_macsec_sc_parsed(void *parsed_result,
                fprintf(stderr, "not supported on port %d\n", res->port_id);
                break;
        default:
-               fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
+               fprintf(stderr, "programming error: (%s)\n", 
rte_strerror(-ret));
        }
 }
 
@@ -510,7 +510,7 @@ cmd_set_macsec_sa_parsed(void *parsed_result,
                fprintf(stderr, "not supported on port %d\n", res->port_id);
                break;
        default:
-               fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
+               fprintf(stderr, "programming error: (%s)\n", 
rte_strerror(-ret));
        }
 }
 
@@ -599,7 +599,7 @@ cmd_tc_min_bw_parsed(void *parsed_result,
                fprintf(stderr, "function not implemented\n");
                break;
        default:
-               fprintf(stderr, "programming error: (%s)\n", strerror(-ret));
+               fprintf(stderr, "programming error: (%s)\n", 
rte_strerror(-ret));
        }
 }
 
-- 
2.33.0

Reply via email to