diff options
Diffstat (limited to '')
-rw-r--r-- | src/nginext/nxt_go_array.c | 2 | ||||
-rw-r--r-- | src/nginext/nxt_go_array.h | 2 | ||||
-rw-r--r-- | src/nginext/nxt_go_run_ctx.c | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/nginext/nxt_go_array.c b/src/nginext/nxt_go_array.c index a788811a..f409cb10 100644 --- a/src/nginext/nxt_go_array.c +++ b/src/nginext/nxt_go_array.c @@ -57,7 +57,7 @@ nxt_go_array_add(nxt_array_t *array) array->nalloc = new_alloc; } - p = (char *) array->elts + array->size * array->nelts; + p = nxt_pointer_to(array->elts, array->size * array->nelts); array->nelts++; return p; diff --git a/src/nginext/nxt_go_array.h b/src/nginext/nxt_go_array.h index 0c3ba336..d96db663 100644 --- a/src/nginext/nxt_go_array.h +++ b/src/nginext/nxt_go_array.h @@ -30,7 +30,7 @@ nxt_go_array_zero_add(nxt_array_t *array) #define \ nxt_go_array_at(array, n) \ - ((void *) ((char *) (array)->elts + (array)->size * (n))) + nxt_pointer_to((array)->elts, (array)->size * (n)) #endif /* _NXT_GO_ARRAY_H_INCLUDED_ */ diff --git a/src/nginext/nxt_go_run_ctx.c b/src/nginext/nxt_go_run_ctx.c index 6a5f8d6b..2d284bc5 100644 --- a/src/nginext/nxt_go_run_ctx.c +++ b/src/nginext/nxt_go_run_ctx.c @@ -96,8 +96,7 @@ nxt_go_ctx_init_msg(nxt_go_msg_t *msg, nxt_port_msg_t *port_msg, if (nxt_fast_path(port_msg->mmap != 0)) { msg->mmap_msg = (nxt_port_mmap_msg_t *) (port_msg + 1); - msg->end = (nxt_port_mmap_msg_t *) ( (char *) msg->mmap_msg + - payload_size ); + msg->end = nxt_pointer_to(msg->mmap_msg, payload_size); mmap_msg = msg->mmap_msg; while(mmap_msg < msg->end) { |