[njs] Backed out changeset 552da720e6e6.

Dmitry Volyntsev xeioex at nginx.com
Mon Jul 23 13:35:48 UTC 2018


details:   http://hg.nginx.org/njs/rev/b1d34de39abd
branches:  
changeset: 565:b1d34de39abd
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Mon Jul 23 16:35:32 2018 +0300
description:
Backed out changeset 552da720e6e6.

The original code was correct, the (int) casting does not change
anything because the type of the '0' literal is int. The solution to the
original problem is to mark CID 1438046 as false-positive.

diffstat:

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

diffs (21 lines):

diff -r d4697241f506 -r b1d34de39abd nxt/nxt_dtoa.c
--- a/nxt/nxt_dtoa.c	Fri Jul 20 20:11:02 2018 +0300
+++ b/nxt/nxt_dtoa.c	Mon Jul 23 16:35:32 2018 +0300
@@ -280,7 +280,7 @@ nxt_prettify(char *start, size_t len, in
         /* 1234e7 -> 12340000000 */
 
         if (kk - length > 0) {
-            memset(&start[length], (int) '0', kk - length);
+            memset(&start[length], '0', kk - length);
         }
 
         return kk;
@@ -305,7 +305,7 @@ nxt_prettify(char *start, size_t len, in
         start[1] = '.';
 
         if (offset - 2 > 0) {
-            memset(&start[2], (int) '0', offset - 2);
+            memset(&start[2], '0', offset - 2);
         }
 
         return (length + offset);


More information about the nginx-devel mailing list