[njs] Fixed return value type of clearTimeout().

Dmitry Volyntsev xeioex at nginx.com
Thu Apr 26 17:36:54 UTC 2018


details:   http://hg.nginx.org/njs/rev/5776906c23da
branches:  
changeset: 511:5776906c23da
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Thu Apr 26 20:21:46 2018 +0300
description:
Fixed return value type of clearTimeout().

Previously, the function may return the "undefined" string.

diffstat:

 njs/njs_time.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 4e647f0bf155 -r 5776906c23da njs/njs_time.c
--- a/njs/njs_time.c	Thu Apr 26 20:21:44 2018 +0300
+++ b/njs/njs_time.c	Thu Apr 26 20:21:46 2018 +0300
@@ -103,7 +103,7 @@ njs_clear_timeout(njs_vm_t *vm, njs_valu
     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_valu
         njs_del_event(vm, event, NJS_EVENT_RELEASE | NJS_EVENT_DELETE);
     }
 
-    vm->retval = njs_string_void;
+    vm->retval = njs_value_void;
 
     return NJS_OK;
 }


More information about the nginx-devel mailing list