diff options
author | orivej <[email protected]> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/restricted/aws/aws-c-common/source/command_line_parser.c | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/restricted/aws/aws-c-common/source/command_line_parser.c')
-rw-r--r-- | contrib/restricted/aws/aws-c-common/source/command_line_parser.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/restricted/aws/aws-c-common/source/command_line_parser.c b/contrib/restricted/aws/aws-c-common/source/command_line_parser.c index 91a37692360..ccbe6d18208 100644 --- a/contrib/restricted/aws/aws-c-common/source/command_line_parser.c +++ b/contrib/restricted/aws/aws-c-common/source/command_line_parser.c @@ -1,6 +1,6 @@ -/** - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0. +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. */ #include <aws/common/command_line_parser.h> @@ -85,17 +85,17 @@ int aws_cli_getopt_long( if (option) { bool has_arg = false; - char *opt_value = memchr(optstring, option->val, strlen(optstring)); - if (!opt_value) { - return '?'; + char *opt_value = memchr(optstring, option->val, strlen(optstring)); + if (!opt_value) { + return '?'; + } + + if (opt_value[1] == ':') { + has_arg = true; } - if (opt_value[1] == ':') { - has_arg = true; - } - if (has_arg) { - if (aws_cli_optind >= argc) { + if (aws_cli_optind >= argc) { return '?'; } |