diff options
author | Valentin Bartenev <vbart@nginx.com> | 2017-06-26 20:22:57 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2017-06-26 20:22:57 +0300 |
commit | 01517e37c1d2b09712a666b7b4870fc932e526a9 (patch) | |
tree | daf7f674390d6df2db36b6f5da0abc0372dca4b8 /src | |
parent | 44b3ad17f4b2f7d43b18df18199543a0ca6f17f7 (diff) | |
download | unit-01517e37c1d2b09712a666b7b4870fc932e526a9.tar.gz unit-01517e37c1d2b09712a666b7b4870fc932e526a9.tar.bz2 |
Simplified nxt_conf_json_object_get_member().
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_conf_json.c | 8 |
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)) { |