aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-12-27 01:28:01 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2017-12-27 09:53:11 +0530
commit26e739a6d986eecfc48be2f594a4eaa2c7c3ce81 (patch)
treed4c84d67eec0fafda3feb838bc424f39c060cfa8
parentc86db31ef5f904664a8ff6f318dcd14e6884e88a (diff)
downloadnnn-26e739a6d986eecfc48be2f594a4eaa2c7c3ce81.tar.gz
Use ffs() tweak.
-rw-r--r--nnn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nnn.c b/nnn.c
index b0a2e49..5064d2a 100644
--- a/nnn.c
+++ b/nnn.c
@@ -1619,7 +1619,7 @@ get_fs_free(const char *path)
if (statvfs(path, &svb) == -1)
return 0;
else
- return svb.f_bavail << (ffs(svb.f_frsize) - 1);
+ return svb.f_bavail << ffs(svb.f_frsize >> 1);
}
static size_t
@@ -1630,7 +1630,7 @@ get_fs_capacity(const char *path)
if (statvfs(path, &svb) == -1)
return 0;
else
- return svb.f_blocks << (ffs(svb.f_bsize) - 1);
+ return svb.f_blocks << ffs(svb.f_bsize >> 1);
}
static int