Welcome! Log In Create A New Profile

Advanced

[njs] Fixed incorrect optimization in njs_string_to_c_string().

Alexander Borisov
July 15, 2019 10:46AM
details: https://hg.nginx.org/njs/rev/3b3e3c133d13
branches:
changeset: 1047:3b3e3c133d13
user: Alexander Borisov <alexander.borisov@nginx.com>
date: Mon Jul 15 17:45:23 2019 +0300
description:
Fixed incorrect optimization in njs_string_to_c_string().

diffstat:

njs/njs_string.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diffs (14 lines):

diff -r e89f5a5709e0 -r 3b3e3c133d13 njs/njs_string.c
--- a/njs/njs_string.c Mon Jul 15 16:20:41 2019 +0300
+++ b/njs/njs_string.c Mon Jul 15 17:45:23 2019 +0300
@@ -3942,10 +3942,6 @@ njs_string_to_c_string(njs_vm_t *vm, njs
} else {
start = value->long_string.data->start;
size = value->long_string.size;
-
- if (start[size] == '\0') {
- return start;
- }
}

data = nxt_mp_alloc(vm->mem_pool, size + 1);
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Fixed incorrect optimization in njs_string_to_c_string().

Alexander Borisov 233 July 15, 2019 10:46AM



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

Online Users

Guests: 223
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready