aboutsummaryrefslogtreecommitdiff
path: root/example/time/time_global_test.c
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2018-05-14 13:10:01 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-05-14 18:47:02 +0300
commit0ee8255c2555ed68721ea5e7679f26a2e53bd8b8 (patch)
treee3e4b5b2c8836c6a4e07b69f6146e86bf2b67c17 /example/time/time_global_test.c
parentad3417a6fd2ba93616b937f9a2d8642eceeb0bf8 (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 'example/time/time_global_test.c')
-rw-r--r--example/time/time_global_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/time/time_global_test.c b/example/time/time_global_test.c
index a879745d3..317f9a270 100644
--- a/example/time/time_global_test.c
+++ b/example/time/time_global_test.c
@@ -259,7 +259,7 @@ int main(int argc, char *argv[])
odph_odpthread_params_t thr_params;
/* let helper collect its own arguments (e.g. --odph_proc) */
- odph_parse_options(argc, argv, NULL, NULL);
+ argc = odph_parse_options(argc, argv);
printf("\nODP global time test starts\n");