From e8393be2b33286e02ca736e7307d3df43cfd48bb Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Mon, 23 Jul 2018 16:35:32 +0300 Subject: [PATCH] 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. --- nxt/nxt_dtoa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nxt/nxt_dtoa.c b/nxt/nxt_dtoa.c index bb3d65a0..6453f87f 100644 --- a/nxt/nxt_dtoa.c +++ b/nxt/nxt_dtoa.c @@ -280,7 +280,7 @@ nxt_prettify(char *start, size_t len, int dec_exp) /* 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, int dec_exp) start[1] = '.'; if (offset - 2 > 0) { - memset(&start[2], (int) '0', offset - 2); + memset(&start[2], '0', offset - 2); } return (length + offset); -- 2.47.3