summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_array.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_array.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_array.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nxt_array.h b/src/nxt_array.h
index 33e9807a..8a99aa2c 100644
--- a/src/nxt_array.h
+++ b/src/nxt_array.h
@@ -27,7 +27,7 @@ NXT_EXPORT void nxt_array_remove(nxt_array_t *array, void *elt);
#define \
nxt_array_last(array) \
- ((void *) ((char *) (array)->elts + (array)->size * ((array)->nelts - 1)))
+ nxt_pointer_to((array)->elts, (array)->size * ((array)->nelts - 1))
#define \
@@ -44,7 +44,7 @@ nxt_inline void *
nxt_array_remove_last(nxt_array_t *array)
{
array->nelts--;
- return (char *) array->elts + array->size * array->nelts;
+ return nxt_pointer_to(array->elts, array->size * array->nelts);
}