[njs] Better name for append elements count in njs_array_expand().

Valentin Bartenev vbart at nginx.com
Wed May 8 22:21:07 UTC 2019


details:   https://hg.nginx.org/njs/rev/4ed09499a560
branches:  
changeset: 958:4ed09499a560
user:      Valentin Bartenev <vbart at nginx.com>
date:      Wed May 08 19:09:10 2019 +0300
description:
Better name for append elements count in njs_array_expand().

No functional changes.

diffstat:

 njs/njs_array.c |  4 ++--
 njs/njs_array.h |  2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r ff76f83fc49a -r 4ed09499a560 njs/njs_array.c
--- a/njs/njs_array.c	Tue May 07 20:41:07 2019 +0300
+++ b/njs/njs_array.c	Wed May 08 19:09:10 2019 +0300
@@ -212,12 +212,12 @@ njs_array_string_add(njs_vm_t *vm, njs_a
 
 njs_ret_t
 njs_array_expand(njs_vm_t *vm, njs_array_t *array, uint32_t prepend,
-    uint32_t new_size)
+    uint32_t append)
 {
     uint64_t     size;
     njs_value_t  *start, *old;
 
-    size = (uint64_t) new_size + array->length;
+    size = (uint64_t) append + array->length;
 
     if (nxt_fast_path(size <= array->size && prepend == 0)) {
         return NXT_OK;
diff -r ff76f83fc49a -r 4ed09499a560 njs/njs_array.h
--- a/njs/njs_array.h	Tue May 07 20:41:07 2019 +0300
+++ b/njs/njs_array.h	Wed May 08 19:09:10 2019 +0300
@@ -20,7 +20,7 @@ njs_ret_t njs_array_add(njs_vm_t *vm, nj
 njs_ret_t njs_array_string_add(njs_vm_t *vm, njs_array_t *array,
     const u_char *start, size_t size, size_t length);
 njs_ret_t njs_array_expand(njs_vm_t *vm, njs_array_t *array, uint32_t prepend,
-    uint32_t size);
+    uint32_t append);
 njs_ret_t njs_array_constructor(njs_vm_t *vm, njs_value_t *args,
     nxt_uint_t nargs, njs_index_t unused);
 


More information about the nginx-devel mailing list