summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_list.c2
-rw-r--r--src/nxt_list.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_list.c b/src/nxt_list.c
index 9a44ce9a..cab925cb 100644
--- a/src/nxt_list.c
+++ b/src/nxt_list.c
@@ -53,7 +53,7 @@ nxt_list_add(nxt_list_t *list)
list->last = last;
}
- elt = nxt_list_data(last) + last->nelts * list->size;
+ elt = nxt_pointer_to(nxt_list_data(last), last->nelts * list->size);
last->nelts++;
return elt;
diff --git a/src/nxt_list.h b/src/nxt_list.h
index 3bb2b139..f400a356 100644
--- a/src/nxt_list.h
+++ b/src/nxt_list.h
@@ -61,7 +61,7 @@ nxt_list_elt(nxt_list_t *list, nxt_uint_t n)
while (part != NULL) {
if (n < (nxt_uint_t) part->nelts) {
- return ((void *) (nxt_list_data(part) + n * (list)->size));
+ return nxt_pointer_to(nxt_list_data(part), n * (list)->size);
}
n -= (nxt_uint_t) part->nelts;
@@ -103,7 +103,7 @@ NXT_EXPORT void *nxt_list_next(nxt_list_t *list, nxt_list_next_t *next);
#define \
nxt_list_next_value(list, next) \
- ((void *) (nxt_list_data((next)->part) + (next)->elt * (list)->size))
+ (nxt_pointer_to(nxt_list_data((next)->part), (next)->elt * (list)->size))
nxt_inline nxt_uint_t