diff options
author | Valentin Bartenev <vbart@nginx.com> | 2017-06-27 17:27:18 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2017-06-27 17:27:18 +0300 |
commit | dfd3cc8c0eb7f3479ee08b5e518abd264da56a29 (patch) | |
tree | b6cdbfab23ce9ea2c498bcb0f540d4847472f067 /src/nxt_sockaddr.c | |
parent | f86c80309885230df2960ef8e1db337f04b11926 (diff) | |
download | unit-dfd3cc8c0eb7f3479ee08b5e518abd264da56a29.tar.gz unit-dfd3cc8c0eb7f3479ee08b5e518abd264da56a29.tar.bz2 |
Applied nxt_pointer_to() and nxt_value_at() where possible.
Diffstat (limited to 'src/nxt_sockaddr.c')
-rw-r--r-- | src/nxt_sockaddr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nxt_sockaddr.c b/src/nxt_sockaddr.c index 6db15d13..3ec4abb6 100644 --- a/src/nxt_sockaddr.c +++ b/src/nxt_sockaddr.c @@ -189,7 +189,7 @@ nxt_sockaddr_text(nxt_sockaddr_t *sa) u_char *p, *start, *end, *octet; uint32_t port; - end = (u_char *) sa + sa->sockaddr_size; + end = nxt_pointer_to(sa, sa->sockaddr_size); switch (sa->u.sockaddr.sa_family) { @@ -199,7 +199,7 @@ nxt_sockaddr_text(nxt_sockaddr_t *sa) sa->start = offset; sa->address_start = offset; - start = (u_char *) sa + offset; + start = nxt_pointer_to(sa, offset); octet = (u_char *) &sa->u.sockaddr_in.sin_addr; p = nxt_sprintf(start, end, "%ud.%ud.%ud.%ud", @@ -220,7 +220,7 @@ nxt_sockaddr_text(nxt_sockaddr_t *sa) sa->start = offset; sa->address_start = offset; - start = (u_char *) sa + offset; + start = nxt_pointer_to(sa, offset); p = start; *p++ = '['; @@ -247,7 +247,7 @@ nxt_sockaddr_text(nxt_sockaddr_t *sa) sa->start = offset; sa->address_start = offset; - start = (u_char *) sa + offset; + start = nxt_pointer_to(sa, offset); p = start; #if (NXT_LINUX) |