diff options
author | Damien George <damien.p.george@gmail.com> | 2017-01-19 23:32:16 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-01-19 23:32:16 +1100 |
commit | 94a587a7506b04918417aa64aa2835f039263fa0 (patch) | |
tree | 8f2500c271825c2eebd4f4d3677a4bd5007cdad3 /py/formatfloat.c | |
parent | 0883a7e72f7122b307798205441c96120446bf75 (diff) | |
download | micropython-94a587a7506b04918417aa64aa2835f039263fa0.tar.gz micropython-94a587a7506b04918417aa64aa2835f039263fa0.zip |
py/formatfloat: Remove unreachable code.
The if-block that this unreachable code is in has a condition "f>=5" so
"fp_isless1(f)" will always fail.
Diffstat (limited to 'py/formatfloat.c')
-rw-r--r-- | py/formatfloat.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/py/formatfloat.c b/py/formatfloat.c index 58a423e38c..9ff80d9f63 100644 --- a/py/formatfloat.c +++ b/py/formatfloat.c @@ -388,10 +388,6 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch } *rs = '1'; } - if (fp_isless1(f) && fmt == 'f') { - // We rounded up to 1.0 - prec--; - } } // verify that we did not overrun the input buffer so far |