diff options
author | Valentin Bartenev <vbart@nginx.com> | 2017-06-21 22:45:20 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2017-06-21 22:45:20 +0300 |
commit | 9593ce769ac85c75d67c9bd4730f6ce95cab6502 (patch) | |
tree | e79f95721992e41984ef48ad88551f8c500fe2ad /src/nxt_conf_json.c | |
parent | 58e24662daf9670aa906b71719a071ef9d960f5e (diff) | |
download | unit-9593ce769ac85c75d67c9bd4730f6ce95cab6502.tar.gz unit-9593ce769ac85c75d67c9bd4730f6ce95cab6502.tar.bz2 |
Removed surplus type casting from nxt_memcmp() calls.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_conf_json.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/nxt_conf_json.c b/src/nxt_conf_json.c index b62cb22d..00000002 100644 --- a/src/nxt_conf_json.c +++ b/src/nxt_conf_json.c @@ -613,9 +613,7 @@ nxt_conf_json_parse_value(u_char *pos, u_char *end, return nxt_conf_json_parse_string(pos, end, value, pool); case 't': - if (nxt_fast_path(end - pos >= 4 - || nxt_memcmp(pos, (u_char *) "true", 4) == 0)) - { + if (nxt_fast_path(end - pos >= 4 || nxt_memcmp(pos, "true", 4) == 0)) { value->u.boolean = 1; value->type = NXT_CONF_JSON_BOOLEAN; @@ -625,9 +623,7 @@ nxt_conf_json_parse_value(u_char *pos, u_char *end, return NULL; case 'f': - if (nxt_fast_path(end - pos >= 5 - || nxt_memcmp(pos, (u_char *) "false", 5) == 0)) - { + if (nxt_fast_path(end - pos >= 5 || nxt_memcmp(pos, "false", 5) == 0)) { value->u.boolean = 0; value->type = NXT_CONF_JSON_BOOLEAN; @@ -637,9 +633,7 @@ nxt_conf_json_parse_value(u_char *pos, u_char *end, return NULL; case 'n': - if (nxt_fast_path(end - pos >= 4 - || nxt_memcmp(pos, (u_char *) "null", 4) == 0)) - { + if (nxt_fast_path(end - pos >= 4 || nxt_memcmp(pos, "null", 4) == 0)) { value->type = NXT_CONF_JSON_NULL; return pos + 4; } |