Skip to contentSkip to conversation

app/compress-perf: call generic strlcpy

PATCH Applied Thomas Monjalon 4 participants 4 messages Feb 24, 2019 – Mar 13, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/compress-perf: call generic strlcpy

The call to strlcpy uses either libc, libbsd or internal rte_strlcpy. No need to call the DPDK flavor explictly.

---
 app/test-compress-perf/comp_perf_options_parse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-compress-perf/comp_perf_options_parse.c +2 -2
index 66eb81fc59..d2b208de35 100644
@@ -373,7 +373,7 @@ parse_driver_name(struct comp_test_data *test_data, const char *arg)
 	if (strlen(arg) > (sizeof(test_data->driver_name) - 1))
 		return -1;
 
-	rte_strlcpy(test_data->driver_name, arg,
+	strlcpy(test_data->driver_name, arg,
 			sizeof(test_data->driver_name));
 
 	return 0;
@@ -385,7 +385,7 @@ parse_test_file(struct comp_test_data *test_data, const char *arg)
 	if (strlen(arg) > (sizeof(test_data->input_file) - 1))
 		return -1;
 
-	rte_strlcpy(test_data->input_file, arg, sizeof(test_data->input_file));
+	strlcpy(test_data->input_file, arg, sizeof(test_data->input_file));
 
 	return 0;
 }
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Checked on Fedora 28

Reviewed-by Rami Rosen <ramirose at gmail.com>
Quoted 38 lines · Thomas Monjalon

The call to strlcpy uses either libc, libbsd or internal rte_strlcpy. No need to call the DPDK flavor explictly.

---
 app/test-compress-perf/comp_perf_options_parse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-compress-perf/comp_perf_options_parse.c +1 -1
index 66eb81fc59..d2b208de35 100644
@@ -373,7 +373,7 @@ parse_driver_name(struct comp_test_data *test_data,
 const char *arg)
        if (strlen(arg) > (sizeof(test_data->driver_name) - 1))
                return -1;
 
-       rte_strlcpy(test_data->driver_name, arg,
+       strlcpy(test_data->driver_name, arg,
                        sizeof(test_data->driver_name));
 
        return 0;
app/test-compress-perf/comp_perf_options_parse.c +1 -1
@@ -385,7 +385,7 @@ parse_test_file(struct comp_test_data *test_data,
 const char *arg)
        if (strlen(arg) > (sizeof(test_data->input_file) - 1))
                return -1;
 
-       rte_strlcpy(test_data->input_file, arg,
 sizeof(test_data->input_file));
+       strlcpy(test_data->input_file, arg, sizeof(test_data->input_file));
 
        return 0;

}
--
2.20.1

Signature · 2 lines
regards,
Rami Rosen
Acked-by on v1 1/1
#3 lore raw
In reply to Thomas Monjalon
Quoted 9 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Sunday, February 24, 2019 11:42 PM
To: De Lara Guarch, Pablo <[email protected]>
Cc: [email protected]; Jozwiak, TomaszX <[email protected]>
Subject: [PATCH] app/compress-perf: call generic strlcpy

Quoted 5 lines

The call to strlcpy uses either libc, libbsd or internal rte_strlcpy. No need to call the DPDK flavor explictly.

2.20.1