aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-05-09 18:45:47 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-05-22 08:44:19 +0530
commit7cb2d22e9f4bd5c5ac0a1fd42f78dddf82441073 (patch)
tree77f6e3aafed34fdee32205cba4af557033cdd720 /src/nnn.c
parent22973733066c5939ed6c41992c907ff5f09b7923 (diff)
downloadnnn-7cb2d22e9f4bd5c5ac0a1fd42f78dddf82441073.tar.gz
Fix build break
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 3d66b1d..50acd35 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2019,7 +2019,7 @@ static char *coolsize(off_t size)
{
static const char * const U = "BKMGTPEZY";
static char size_buf[12]; /* Buffer to hold human readable size */
- off_t rem;
+ static off_t rem;
int i;
rem = i = 0;
@@ -2067,9 +2067,9 @@ static char *coolsize(off_t size)
}
if (i > 0 && i < 6)
- snprintf(size_buf, 12, "%lu.%0*lu%c", size, i, rem, U[i]);
+ snprintf(size_buf, 12, "%lu.%0*lu%c", (ulong)size, i, (ulong)rem, U[i]);
else
- snprintf(size_buf, 12, "%lu%c", size, U[i]);
+ snprintf(size_buf, 12, "%lu%c", (ulong)size, U[i]);
return size_buf;
}