Welcome! Log In Create A New Profile

Advanced

[njs] Miscellaneous changes.

March 21, 2017 09:24AM
details: http://hg.nginx.org/njs/rev/6887b2d46f87
branches:
changeset: 317:6887b2d46f87
user: Igor Sysoev <igor@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;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Miscellaneous changes.

Igor Sysoev 503 March 21, 2017 09:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 69
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready