aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-07-06 18:55:48 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-07-06 18:55:48 +0530
commitb7b3dbac220f6817f843ca768bf4385b8ed90e90 (patch)
treed6c154f747722423cd0c656d6dd7c7474e67579b /src
parent25a704cd27d3dbd530103bc92cd20ead727d8a9c (diff)
downloadnnn-b7b3dbac220f6817f843ca768bf4385b8ed90e90.tar.gz
Revert "Move declarations up"
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 060c7df..7e6cebd 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2177,13 +2177,13 @@ static char *coolsize(off_t size)
}
if (i > 0 && i < 6 && rem) {
+ ret = xstrlcpy(size_buf, xitoa(size), 11);
+ size_buf[ret - 1] = '.';
+
char *frac = xitoa(rem);
size_t toprint = i > 3 ? 3 : i;
size_t len = strlen(frac);
- ret = xstrlcpy(size_buf, xitoa(size), 11);
- size_buf[ret - 1] = '.';
-
if (len < toprint) {
size_buf[ret] = size_buf[ret + 1] = size_buf[ret + 2] = '0';
xstrlcpy(size_buf + ret + (toprint - len), frac, (toprint - len) + 1);