From: Dmitry Volyntsev Date: Fri, 28 Aug 2020 11:48:22 +0000 (+0000) Subject: Aligning switch statements in njs_typed_array_prototype_iterator(). X-Git-Tag: 0.4.4~20 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=4aa89efd42046ff5599d42a99c42a0bb4f2469e8;p=njs.git 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. --- 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++) {