[njs] Miscellaneous changes.
Igor Sysoev
igor at sysoev.ru
Tue Mar 21 13:22:22 UTC 2017
details: http://hg.nginx.org/njs/rev/6887b2d46f87
branches:
changeset: 317:6887b2d46f87
user: Igor Sysoev <igor at sysoev.ru>
date: Tue Mar 21 16:14:16 2017 +0300
description:
Miscellaneous changes.
diffstat:
njs/njs_array.c | 6 +++---
nxt/test/rbtree_unit_test.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r ee391489a56d -r 6887b2d46f87 njs/njs_array.c
--- a/njs/njs_array.c Tue Mar 21 16:09:09 2017 +0300
+++ b/njs/njs_array.c Tue Mar 21 16:14:16 2017 +0300
@@ -1295,7 +1295,7 @@ static njs_ret_t
njs_array_prototype_fill(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs,
njs_index_t unused)
{
- nxt_int_t start, end, length;
+ nxt_int_t i, start, end, length;
njs_array_t *array;
vm->retval = args[0];
@@ -1346,8 +1346,8 @@ njs_array_prototype_fill(njs_vm_t *vm, n
}
}
- while (start < end) {
- array->start[start++] = args[1];
+ for (i = start; i < end; i++) {
+ array->start[i] = args[1];
}
return NXT_OK;
diff -r ee391489a56d -r 6887b2d46f87 nxt/test/rbtree_unit_test.c
--- a/nxt/test/rbtree_unit_test.c Tue Mar 21 16:09:09 2017 +0300
+++ b/nxt/test/rbtree_unit_test.c Tue Mar 21 16:14:16 2017 +0300
@@ -51,7 +51,7 @@ rbtree_unit_test(nxt_uint_t n)
keys = malloc(n * sizeof(uint32_t));
if (keys == NULL) {
- free(keys);
+ free(items);
return NXT_ERROR;
}
More information about the nginx-devel
mailing list