From d8d7f2b1503521e1177c6c78293ee6a27ffe3e8a Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Thu, 26 Apr 2018 20:21:46 +0300 Subject: [PATCH] Fixed return value type of clearTimeout(). Previously, the function may return the "undefined" string. --- njs/njs_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/njs/njs_time.c b/njs/njs_time.c index f13a4062..d97c80ba 100644 --- a/njs/njs_time.c +++ b/njs/njs_time.c @@ -103,7 +103,7 @@ njs_clear_timeout(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, nxt_lvlhsh_query_t lhq; if (nxt_fast_path(nargs < 2) || !njs_is_number(&args[1])) { - vm->retval = njs_string_void; + vm->retval = njs_value_void; return NJS_OK; } @@ -120,7 +120,7 @@ njs_clear_timeout(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_del_event(vm, event, NJS_EVENT_RELEASE | NJS_EVENT_DELETE); } - vm->retval = njs_string_void; + vm->retval = njs_value_void; return NJS_OK; } -- 2.47.3