[njs] Fixed typo in debug code introduced in 3e754413e907 (0.7.4).

Dmitry Volyntsev xeioex at nginx.com
Wed Jun 1 04:53:52 UTC 2022


details:   https://hg.nginx.org/njs/rev/1347c84742c0
branches:  
changeset: 1869:1347c84742c0
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Tue May 31 21:48:19 2022 -0700
description:
Fixed typo in debug code introduced in 3e754413e907 (0.7.4).

diffstat:

 src/njs_vmcode.h |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (26 lines):

diff -r 5b7676ec600d -r 1347c84742c0 src/njs_vmcode.h
--- a/src/njs_vmcode.h	Tue May 31 09:26:47 2022 -0700
+++ b/src/njs_vmcode.h	Tue May 31 21:48:19 2022 -0700
@@ -452,14 +452,15 @@ njs_object_t *njs_function_new_object(nj
 
 #ifdef NJS_OPCODE_DEBUG
 #define njs_vmcode_debug(vm, pc, prefix) {                                    \
-    do {                                                                      \
-        njs_vm_code_t  *code;                                                 \
+        do {                                                                  \
+            njs_vm_code_t  *code;                                             \
+                                                                              \
+            code = njs_lookup_code(vm, pc);                                   \
                                                                               \
-        code = njs_lookup_code(vm, pc);                                       \
-                                                                              \
-        njs_printf("%s %V\n", prefix,                                         \
-                   (code != NULL) ? &code->name : &njs_entry_unknown);        \
-    } while (0)
+            njs_printf("%s %V\n", prefix,                                     \
+                       (code != NULL) ? &code->name : &njs_entry_unknown);    \
+        } while (0);                                                          \
+    }
 #else
 #define njs_vmcode_debug(vm, pc, prefix)
 #endif



More information about the nginx-devel mailing list