From b561b50e397fa20f2580c7744512e843c132867d Mon Sep 17 00:00:00 2001 From: hongzhidao Date: Sat, 16 Feb 2019 23:18:43 +0800 Subject: [PATCH] Fixed fast paths. --- njs/njs_variable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/njs/njs_variable.c b/njs/njs_variable.c index 536722aa..d3b8e2b4 100644 --- a/njs/njs_variable.c +++ b/njs/njs_variable.c @@ -144,7 +144,7 @@ njs_variable_reference(njs_vm_t *vm, njs_parser_scope_t *scope, ret = nxt_lvlhsh_insert(&scope->references, &lhq); - if (nxt_slow_path(ret != NXT_ERROR)) { + if (nxt_fast_path(ret != NXT_ERROR)) { ret = NXT_OK; } } @@ -493,7 +493,7 @@ njs_name_copy(njs_vm_t *vm, nxt_str_t *dst, nxt_str_t *src) dst->start = nxt_mp_alloc(vm->mem_pool, src->length); - if (nxt_slow_path(dst->start != NULL)) { + if (nxt_fast_path(dst->start != NULL)) { (void) memcpy(dst->start, src->start, src->length); return NXT_OK; -- 2.47.3