Welcome! Log In Create A New Profile

Advanced

[njs] Removed dead store introduced in 398f4de34fe7.

Dmitry Volyntsev
May 27, 2023 01:08PM
details: https://hg.nginx.org/njs/rev/84eadc155d46
branches:
changeset: 2139:84eadc155d46
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri May 26 20:58:19 2023 -0700
description:
Removed dead store introduced in 398f4de34fe7.

Found by Coverity (CID 1530432).

diffstat:

src/njs_array.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)

diffs (21 lines):

diff -r b9d18d4dd34e -r 84eadc155d46 src/njs_array.c
--- a/src/njs_array.c Fri May 26 19:43:24 2023 -0700
+++ b/src/njs_array.c Fri May 26 20:58:19 2023 -0700
@@ -2860,14 +2860,9 @@ njs_sort_indexed_properties(njs_vm_t *vm
goto exception;
}

- if (slots != NULL) {
- p = (void *) njs_cpymem(newslots, slots,
- sizeof(njs_array_sort_slot_t) * (p - slots));
- njs_mp_free(vm->mem_pool, slots);
-
- } else {
- p = newslots;
- }
+ p = (void *) njs_cpymem(newslots, slots,
+ sizeof(njs_array_sort_slot_t) * (p - slots));
+ njs_mp_free(vm->mem_pool, slots);

slots = newslots;
end = slots + nlen;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Removed dead store introduced in 398f4de34fe7.

Dmitry Volyntsev 405 May 27, 2023 01:08PM



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

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready