Welcome! Log In Create A New Profile

Advanced

[njs] Aligning switch statements in njs_typed_array_prototype_iterator().

Dmitry Volyntsev
August 28, 2020 07:54AM
details: https://hg.nginx.org/njs/rev/b0092a58d4fa
branches:
changeset: 1511:b0092a58d4fa
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Aug 28 11:48:22 2020 +0000
description:
Aligning switch statements in njs_typed_array_prototype_iterator().

Merging NJS_ARRAY_FILTER case to default case for all switch statements.
This makes code more static-analyzer friendly.

diffstat:

src/njs_typed_array.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r 0a5145a78a36 -r b0092a58d4fa src/njs_typed_array.c
--- a/src/njs_typed_array.c Fri Aug 28 11:47:50 2020 +0000
+++ b/src/njs_typed_array.c Fri Aug 28 11:48:22 2020 +0000
@@ -884,13 +884,11 @@ njs_typed_array_prototype_iterator(njs_v
break;

case NJS_ARRAY_FILTER:
+ default:
r = njs_arr_init(vm->mem_pool, &results, NULL, 4, sizeof(njs_value_t));
if (njs_slow_path(r == NULL)) {
return NJS_ERROR;
}
-
- default:
- break;
}

for (i = 0; i < length; i++) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Aligning switch statements in njs_typed_array_prototype_iterator().

Dmitry Volyntsev 107 August 28, 2020 07:54AM



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

Online Users

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