Commit 91da65f4 authored by Tom Lane's avatar Tom Lane

Remove a couple of unnecessary if-tests.

Commit abd9ca37 replaced a couple of while-loops in fmtfloat()
with calls to dopr_outchmulti, but I (tgl) failed to notice that
the new if-tests guarding those calls were really unnecessary,
because they're inside a larger if-block checking the same thing.

Ranier Vilela

Discussion: https://postgr.es/m/MN2PR18MB2927850AB00CF39CC370D107E34B0@MN2PR18MB2927.namprd18.prod.outlook.com
parent 45ff049e
...@@ -1227,16 +1227,14 @@ fmtfloat(double value, char type, int forcesign, int leftjust, ...@@ -1227,16 +1227,14 @@ fmtfloat(double value, char type, int forcesign, int leftjust,
{ {
/* pad before exponent */ /* pad before exponent */
dostr(convert, epos - convert, target); dostr(convert, epos - convert, target);
if (zeropadlen > 0) dopr_outchmulti('0', zeropadlen, target);
dopr_outchmulti('0', zeropadlen, target);
dostr(epos, vallen - (epos - convert), target); dostr(epos, vallen - (epos - convert), target);
} }
else else
{ {
/* no exponent, pad after the digits */ /* no exponent, pad after the digits */
dostr(convert, vallen, target); dostr(convert, vallen, target);
if (zeropadlen > 0) dopr_outchmulti('0', zeropadlen, target);
dopr_outchmulti('0', zeropadlen, target);
} }
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment