]> git.kaiwu.me - njs.git/commitdiff
Fixed return value type of clearTimeout().
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 26 Apr 2018 17:21:46 +0000 (20:21 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Thu, 26 Apr 2018 17:21:46 +0000 (20:21 +0300)
Previously, the function may return the "undefined" string.

njs/njs_time.c

index f13a40626d08246b8544568bc648f9e764391f08..d97c80baa9b58e8594dcb319401b868bb9922609 100644 (file)
@@ -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;
 }