diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2017-12-27 01:28:01 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2017-12-27 09:53:11 +0530 |
commit | 26e739a6d986eecfc48be2f594a4eaa2c7c3ce81 (patch) | |
tree | d4c84d67eec0fafda3feb838bc424f39c060cfa8 | |
parent | c86db31ef5f904664a8ff6f318dcd14e6884e88a (diff) | |
download | nnn-26e739a6d986eecfc48be2f594a4eaa2c7c3ce81.tar.gz |
Use ffs() tweak.
-rw-r--r-- | nnn.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |