git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
devtools: recommend new logtype helpers
[dpdk.git]
/
app
/
test-crypto-perf
/
cperf_options_parsing.c
diff --git
a/app/test-crypto-perf/cperf_options_parsing.c
b/app/test-crypto-perf/cperf_options_parsing.c
index
0466f7b
..
e84f56c
100644
(file)
--- a/
app/test-crypto-perf/cperf_options_parsing.c
+++ b/
app/test-crypto-perf/cperf_options_parsing.c
@@
-506,6
+506,12
@@
parse_test_name(struct cperf_options *opts,
{
char *test_name = (char *) rte_zmalloc(NULL,
sizeof(char) * (strlen(arg) + 3), 0);
{
char *test_name = (char *) rte_zmalloc(NULL,
sizeof(char) * (strlen(arg) + 3), 0);
+ if (test_name == NULL) {
+ RTE_LOG(ERR, USER1, "Failed to rte zmalloc with size: %zu\n",
+ strlen(arg) + 3);
+ return -1;
+ }
+
snprintf(test_name, strlen(arg) + 3, "[%s]", arg);
opts->test_name = test_name;
snprintf(test_name, strlen(arg) + 3, "[%s]", arg);
opts->test_name = test_name;
@@
-983,7
+989,7
@@
cperf_options_parse(struct cperf_options *options, int argc, char **argv)
switch (opt) {
case 'h':
usage(argv[0]);
switch (opt) {
case 'h':
usage(argv[0]);
-
rte_exit(EXIT_SUCCESS, "Displayed help\n"
);
+
exit(EXIT_SUCCESS
);
break;
/* long options */
case 0:
break;
/* long options */
case 0: