summaryrefslogtreecommitdiffhomepage
path: root/src/argv
diff options
context:
space:
mode:
Diffstat (limited to 'src/argv')
-rw-r--r--src/argv/ntapi_tt_argv_envp.c3
-rw-r--r--src/argv/ntapi_tt_get_option.c6
2 files changed, 4 insertions, 5 deletions
diff --git a/src/argv/ntapi_tt_argv_envp.c b/src/argv/ntapi_tt_argv_envp.c
index bfa0cd2..7a08776 100644
--- a/src/argv/ntapi_tt_argv_envp.c
+++ b/src/argv/ntapi_tt_argv_envp.c
@@ -193,8 +193,7 @@ int32_t __stdcall __ntapi_tt_parse_cmd_line_args_utf16(
} else {
/* the current character is not a delimiter... */
/* determine wch_next */
- if (((*wch >= 0x0000) && (*wch < 0xD800)) \
- || ((*wch >= 0xE000) && (*wch < 0x10000))) {
+ if ((*wch < 0xD800) || (*wch >= 0xE000)) {
/* in the BMP, single 16-bit representation */
wch_next = wch + 1;
} else if ((*wch >= 0xD800) && (*wch < 0xDC00)) {
diff --git a/src/argv/ntapi_tt_get_option.c b/src/argv/ntapi_tt_get_option.c
index e6f0748..7056a3c 100644
--- a/src/argv/ntapi_tt_get_option.c
+++ b/src/argv/ntapi_tt_get_option.c
@@ -55,7 +55,7 @@
static int __inline__ __fastcall __is_bmp_code_point(wchar16_t code_point)
{
return (((code_point >= 0x0000) && (code_point < 0xD800)) \
- || ((code_point >= 0xE000) && (code_point < 0x10000)));
+ || (code_point >= 0xE000));
}
@@ -418,7 +418,7 @@ int32_t __stdcall __ntapi_tt_validate_program_options(
/* validate the occurrence */
if (idx_option) {
- if (option->flags && NT_OPTION_ALLOWED_ONCE) {
+ if (option->flags & NT_OPTION_ALLOWED_ONCE) {
if (option->option_count) {
options_meta->idx_invalid_argument
= idx_arg;
@@ -428,7 +428,7 @@ int32_t __stdcall __ntapi_tt_validate_program_options(
}
}
- if (option->flags && NT_OPTION_VALUE_REQUIRED) {
+ if (option->flags & NT_OPTION_VALUE_REQUIRED) {
if ((!(*pvalue)) || (*pvalue == HYPHEN)) {
options_meta->idx_missing_option_value
= idx_arg;