summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conn_proxy.c
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_conn_proxy.c
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_conn_proxy.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/nxt_conn_proxy.c b/src/nxt_conn_proxy.c
index 63a41c39..055a288d 100644
--- a/src/nxt_conn_proxy.c
+++ b/src/nxt_conn_proxy.c
@@ -782,14 +782,7 @@ nxt_conn_proxy_write_timeout(nxt_task_t *task, void *obj, void *data)
static nxt_msec_t
nxt_conn_proxy_timeout_value(nxt_conn_t *c, uintptr_t data)
{
- nxt_msec_t *timer;
- nxt_conn_proxy_t *p;
-
- p = c->socket.data;
-
- timer = (nxt_msec_t *) ((char *) p + data);
-
- return *timer;
+ return nxt_value_at(nxt_msec_t, c->socket.data, data);
}