summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conf_json.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2017-06-26 20:22:57 +0300
committerValentin Bartenev <vbart@nginx.com>2017-06-26 20:22:57 +0300
commit01517e37c1d2b09712a666b7b4870fc932e526a9 (patch)
treedaf7f674390d6df2db36b6f5da0abc0372dca4b8 /src/nxt_conf_json.c
parent44b3ad17f4b2f7d43b18df18199543a0ca6f17f7 (diff)
downloadunit-01517e37c1d2b09712a666b7b4870fc932e526a9.tar.gz
unit-01517e37c1d2b09712a666b7b4870fc932e526a9.tar.bz2
Simplified nxt_conf_json_object_get_member().
Diffstat (limited to 'src/nxt_conf_json.c')
-rw-r--r--src/nxt_conf_json.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/nxt_conf_json.c b/src/nxt_conf_json.c
index 2117b468..b6deade3 100644
--- a/src/nxt_conf_json.c
+++ b/src/nxt_conf_json.c
@@ -236,13 +236,7 @@ nxt_conf_json_object_get_member(nxt_conf_json_value_t *value, nxt_str_t *name,
for (n = 0; n < object->count; n++) {
member = &object->members[n];
- if (member->name.type == NXT_CONF_JSON_SHORT_STRING) {
- str.length = member->name.u.str[0];
- str.start = &member->name.u.str[1];
-
- } else {
- str = *member->name.u.string;
- }
+ nxt_conf_json_value_get_string(&member->name, &str);
if (nxt_strstr_eq(&str, name)) {