diff options
author | Petri Savolainen <petri.savolainen@linaro.org> | 2018-05-14 13:10:01 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-05-14 18:47:02 +0300 |
commit | 0ee8255c2555ed68721ea5e7679f26a2e53bd8b8 (patch) | |
tree | e3e4b5b2c8836c6a4e07b69f6146e86bf2b67c17 /test/performance/odp_sched_pktio.c | |
parent | ad3417a6fd2ba93616b937f9a2d8642eceeb0bf8 (diff) |
helper: thread: don't use getopt library
Don't use getopt library calls for helper options. Getopt
library reset is not portable in practice. Library interface
includes global variables and different internal state
variables depending on POSIX version. There's no need for helper
to use getopt calls or set getopt global variables at all. It's
much more simple (and portable) to remove helper options from
argv[] and return new value for argc.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/performance/odp_sched_pktio.c')
-rw-r--r-- | test/performance/odp_sched_pktio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/performance/odp_sched_pktio.c b/test/performance/odp_sched_pktio.c index 46a08c925..109ae87e2 100644 --- a/test/performance/odp_sched_pktio.c +++ b/test/performance/odp_sched_pktio.c @@ -364,7 +364,7 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options) test_options->num_pktio_queue = 0; /* let helper collect its own arguments (e.g. --odph_proc) */ - odph_parse_options(argc, argv, shortopts, longopts); + argc = odph_parse_options(argc, argv); while (1) { opt = getopt_long(argc, argv, shortopts, longopts, &long_index); |