summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_job_resolve.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-02-01 19:20:07 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-02-01 19:20:07 +0300
commit6e67bee0f4f96ad0a7d1a231dfdae8431714c66a (patch)
treec422698ab3b7828f7346ca18e1f5a1b8305ed769 /src/nxt_job_resolve.c
parent8942550b13515e54aff9d682bec3da45ade26e18 (diff)
downloadunit-6e67bee0f4f96ad0a7d1a231dfdae8431714c66a.tar.gz
unit-6e67bee0f4f96ad0a7d1a231dfdae8431714c66a.tar.bz2
nxt_str_t changes.
Diffstat (limited to 'src/nxt_job_resolve.c')
-rw-r--r--src/nxt_job_resolve.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nxt_job_resolve.c b/src/nxt_job_resolve.c
index f0b34e2c..e220b085 100644
--- a/src/nxt_job_resolve.c
+++ b/src/nxt_job_resolve.c
@@ -12,7 +12,7 @@ nxt_job_resolve(nxt_job_resolve_t *jbr)
{
int err;
u_char *host;
- size_t len;
+ size_t length;
nxt_uint_t n;
nxt_mem_pool_t *mp;
nxt_sockaddr_t *sa;
@@ -25,19 +25,19 @@ nxt_job_resolve(nxt_job_resolve_t *jbr)
handler = jbr->error_handler;
res = NULL;
- len = jbr->name.len + 1;
+ length = jbr->name.length + 1;
- if (nxt_fast_path(len <= NXT_BUFSIZE)) {
+ if (nxt_fast_path(length <= NXT_BUFSIZE)) {
host = buf;
} else {
- host = nxt_mem_alloc(jbr->job.mem_pool, len);
+ host = nxt_mem_alloc(jbr->job.mem_pool, length);
if (nxt_slow_path(host == NULL)) {
goto fail;
}
}
- nxt_cpystrn(host, jbr->name.data, len);
+ nxt_cpystrn(host, jbr->name.start, length);
nxt_memzero(&hint, sizeof(struct addrinfo));
hint.ai_socktype = SOCK_STREAM;