[njs] Fixed using %*s format in nxt_printf().

Sergey Kandaurov pluknet at nginx.com
Wed Apr 10 10:35:13 UTC 2019


details:   https://hg.nginx.org/njs/rev/d92dc72dd58d
branches:  
changeset: 874:d92dc72dd58d
user:      Sergey Kandaurov <pluknet at nginx.com>
date:      Tue Apr 09 15:00:27 2019 +0300
description:
Fixed using %*s format in nxt_printf().

diffstat:

 njs/njs_disassembler.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 84cb61f23b7e -r d92dc72dd58d njs/njs_disassembler.c
--- a/njs/njs_disassembler.c	Sun Apr 07 00:09:09 2019 +0800
+++ b/njs/njs_disassembler.c	Tue Apr 09 15:00:27 2019 +0300
@@ -420,7 +420,7 @@ njs_disassemble(u_char *start, u_char *e
                     code3 = (njs_vmcode_3addr_t *) p;
 
                     nxt_printf("%05uz %*s  %04Xz %04Xz %04Xz\n",
-                               p - start, (int) name->length, name->start,
+                               p - start, name->length, name->start,
                                (size_t) code3->dst, (size_t) code3->src1,
                                (size_t) code3->src2);
 
@@ -428,14 +428,14 @@ njs_disassemble(u_char *start, u_char *e
                     code2 = (njs_vmcode_2addr_t *) p;
 
                     nxt_printf("%05uz %*s  %04Xz %04Xz\n",
-                               p - start, (int) name->length, name->start,
+                               p - start, name->length, name->start,
                                (size_t) code2->dst, (size_t) code2->src);
 
                 } else if (code_name->size == sizeof(njs_vmcode_1addr_t)) {
                     code1 = (njs_vmcode_1addr_t *) p;
 
                     nxt_printf("%05uz %*s  %04Xz\n",
-                               p - start, (int) name->length, name->start,
+                               p - start, name->length, name->start,
                                (size_t) code1->index);
                 }
 


More information about the nginx-devel mailing list