diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-07-05 02:47:55 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-07-05 02:47:55 +0530 |
commit | afdfcecb9c757eb52be34f854947de48fd437447 (patch) | |
tree | ab913b7bc2a7550eca2b1f9c6114340877391247 /src/nnn.c | |
parent | a25e878dfca2e101d64487ee158103de25175a32 (diff) | |
download | nnn-afdfcecb9c757eb52be34f854947de48fd437447.tar.gz |
Move declarations up
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2179,13 +2179,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); |