diff options
author | Valentin Bartenev <vbart@nginx.com> | 2018-04-04 18:13:05 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2018-04-04 18:13:05 +0300 |
commit | 0665896a5593fb41c92cbf164182a058ee40518c (patch) | |
tree | d657fac84d35aa3f605d25dc8e0a3c165db93b30 /src/nxt_conf.c | |
parent | 43ba7aad6cadfab2eb45f09e894dec072c93e6cd (diff) | |
download | unit-0665896a5593fb41c92cbf164182a058ee40518c.tar.gz unit-0665896a5593fb41c92cbf164182a058ee40518c.tar.bz2 |
Style: capitalized letters in hexadecimal literals.
Diffstat (limited to 'src/nxt_conf.c')
-rw-r--r-- | src/nxt_conf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c index 6d5d3382..b3aabcba 100644 --- a/src/nxt_conf.c +++ b/src/nxt_conf.c @@ -1650,7 +1650,7 @@ nxt_conf_json_parse_string(nxt_mp_t *mp, nxt_conf_value_t *value, u_char *start, p += 4; if (utf_high != 0) { - if (nxt_slow_path(utf < 0xdc00 || utf > 0xdfff)) { + if (nxt_slow_path(utf < 0xDC00 || utf > 0xDFFF)) { nxt_conf_json_parse_error(error, p - 12, "Invalid JSON encoding sequence. This 12-byte " @@ -1660,16 +1660,16 @@ nxt_conf_json_parse_string(nxt_mp_t *mp, nxt_conf_value_t *value, u_char *start, return NULL; } - utf = ((utf_high - 0xd800) << 10) + (utf - 0xdc00) + 0x10000; + utf = ((utf_high - 0xD800) << 10) + (utf - 0xDC00) + 0x10000; break; } - if (utf < 0xd800 || utf > 0xdfff) { + if (utf < 0xD800 || utf > 0xDFFF) { break; } - if (utf > 0xdbff || p[0] != '\\' || p[1] != 'u') { + if (utf > 0xDBFF || p[0] != '\\' || p[1] != 'u') { nxt_conf_json_parse_error(error, p - 6, "Invalid JSON encoding sequence. This 6-byte sequence " @@ -2222,7 +2222,7 @@ nxt_conf_json_escape_length(u_char *p, size_t size) if (ch == '\\' || ch == '"') { len++; - } else if (ch <= 0x1f) { + } else if (ch <= 0x1F) { switch (ch) { case '\n': @@ -2253,7 +2253,7 @@ nxt_conf_json_escape(u_char *dst, u_char *src, size_t size) while (size) { ch = *src++; - if (ch > 0x1f) { + if (ch > 0x1F) { if (ch == '\\' || ch == '"') { *dst++ = '\\'; @@ -2289,7 +2289,7 @@ nxt_conf_json_escape(u_char *dst, u_char *src, size_t size) *dst++ = 'u'; *dst++ = '0'; *dst++ = '0'; *dst++ = '0' + (ch >> 4); - ch &= 0xf; + ch &= 0xF; *dst++ = (ch < 10) ? ('0' + ch) : ('A' + ch - 10); } |