From 4aa89efd42046ff5599d42a99c42a0bb4f2469e8 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Fri, 28 Aug 2020 11:48:22 +0000 Subject: [PATCH] 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. --- src/njs_typed_array.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/njs_typed_array.c b/src/njs_typed_array.c index 8f55d34c..9418c027 100644 --- a/src/njs_typed_array.c +++ b/src/njs_typed_array.c @@ -884,13 +884,11 @@ njs_typed_array_prototype_iterator(njs_vm_t *vm, njs_value_t *args, 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++) { -- 2.47.3