From aba8b087019fb1dc5e6f282bd79c86ace0b69999 Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Mon, 22 Nov 2021 15:51:28 -0500 Subject: [PATCH] SWDEV-1 - Fix getopt for options that don't have colon Change-Id: Ibb8907e23294bfa033bdefb243ddac35574983b0 --- opencl/tests/ocltst/env/getopt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opencl/tests/ocltst/env/getopt.cpp b/opencl/tests/ocltst/env/getopt.cpp index 9964b93a71..72ff9c8adb 100644 --- a/opencl/tests/ocltst/env/getopt.cpp +++ b/opencl/tests/ocltst/env/getopt.cpp @@ -42,7 +42,8 @@ int getopt(int argc, char *const argv[], const char *optstring) { return '?'; } optarg = argv[optind]; - optind++; } + + optind++; return opt; }