Welcome! Log In Create A New Profile

Advanced

[njs] Removed dead store assignment after 1c729f765cfb.

Dmitry Volyntsev
July 07, 2020 08:26AM
details: https://hg.nginx.org/njs/rev/63b43891bc51
branches:
changeset: 1457:63b43891bc51
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Tue Jul 07 12:23:47 2020 +0000
description:
Removed dead store assignment after 1c729f765cfb.

Found by Clang static analyzer.

diffstat:

src/njs_string.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r e88aef77c653 -r 63b43891bc51 src/njs_string.c
--- a/src/njs_string.c Tue Jul 07 12:23:46 2020 +0000
+++ b/src/njs_string.c Tue Jul 07 12:23:47 2020 +0000
@@ -3631,7 +3631,7 @@ njs_string_prototype_replace(njs_vm_t *v

r = njs_cpymem(r, string.start, p - string.start);
r = njs_cpymem(r, ret_string.start, ret_string.size);
- r = njs_cpymem(r, p + s.size, string.size - s.size - (p - string.start));
+ memcpy(r, p + s.size, string.size - s.size - (p - string.start));

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

[njs] Removed dead store assignment after 1c729f765cfb.

Dmitry Volyntsev 64 July 07, 2020 08:26AM



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

Online Users

Guests: 109
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