Code style violation corrected

pull/15152/head
sytse 2021-10-29 13:31:56 +02:00
parent b99584d16d
commit 43f0c14c9a
1 changed files with 2 additions and 4 deletions

View File

@ -287,8 +287,7 @@ static void mbed_minimal_formatted_string_double(char *buffer, size_t length, in
if (value < 0) {
/* The part after the dot does not have a sign, so negate the value before rounding */
decimal = -decimal_double + 0.5;
if (decimal >= precision)
{
if (decimal >= precision) {
/* Rounding carries over to value's integer part (e.g. -1.95 with dec_precision=1 -> -2.0) */
integer--;
decimal = 0;
@ -296,8 +295,7 @@ static void mbed_minimal_formatted_string_double(char *buffer, size_t length, in
} else {
/* Round the value */
decimal = decimal_double + 0.5;
if (decimal >= precision)
{
if (decimal >= precision) {
/* Rounding carries over to value's integer part (e.g. 1.95 with dec_precision=1 -> 2.0) */
integer++;
decimal = 0;