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 /helper/test | |
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 'helper/test')
-rw-r--r-- | helper/test/odpthreads.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helper/test/odpthreads.c b/helper/test/odpthreads.c index aa61e6352..ad48ec2d5 100644 --- a/helper/test/odpthreads.c +++ b/helper/test/odpthreads.c @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) char cpumaskstr[ODP_CPUMASK_STR_SIZE]; /* let helper collect its own arguments (e.g. --odph_proc) */ - odph_parse_options(argc, argv, NULL, NULL); + argc = odph_parse_options(argc, argv); if (odp_init_global(&odp_instance, NULL, NULL)) { ODPH_ERR("Error: ODP global init failed.\n"); |