summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_sockaddr.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2017-06-27 17:27:18 +0300
committerValentin Bartenev <vbart@nginx.com>2017-06-27 17:27:18 +0300
commitdfd3cc8c0eb7f3479ee08b5e518abd264da56a29 (patch)
treeb6cdbfab23ce9ea2c498bcb0f540d4847472f067 /src/nxt_sockaddr.h
parentf86c80309885230df2960ef8e1db337f04b11926 (diff)
downloadunit-dfd3cc8c0eb7f3479ee08b5e518abd264da56a29.tar.gz
unit-dfd3cc8c0eb7f3479ee08b5e518abd264da56a29.tar.bz2
Applied nxt_pointer_to() and nxt_value_at() where possible.
Diffstat (limited to '')
-rw-r--r--src/nxt_sockaddr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_sockaddr.h b/src/nxt_sockaddr.h
index 11f4b9d1..dc4477c9 100644
--- a/src/nxt_sockaddr.h
+++ b/src/nxt_sockaddr.h
@@ -102,9 +102,9 @@ NXT_EXPORT nxt_int_t nxt_inet6_addr(struct in6_addr *in6_addr, u_char *buf,
(sizeof("[ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535") - 1)
-#define nxt_sockaddr_start(sa) ((u_char *) (sa) + (sa)->start)
-#define nxt_sockaddr_address(sa) ((u_char *) (sa) + (sa)->address_start)
-#define nxt_sockaddr_port(sa) ((u_char *) (sa) + (sa)->port_start)
+#define nxt_sockaddr_start(sa) nxt_pointer_to(sa, (sa)->start)
+#define nxt_sockaddr_address(sa) nxt_pointer_to(sa, (sa)->address_start)
+#define nxt_sockaddr_port(sa) nxt_pointer_to(sa, (sa)->port_start)
#define nxt_sockaddr_length(sa) ((sa)->length - (sa)->port_start)