aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib.c')
-rw-r--r--lib/lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lib.c b/lib/lib.c
index f70d379c..0f2b0120 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -868,8 +868,8 @@ int human_readable(char *buf, unsigned long long num)
{
int end, len;
- len = sprintf(buf, "%lld", num);
- end = ((len-1)%3)+1;
+ len = sprintf(buf, "%lld", num)-1;
+ end = (len%3)+1;
len /= 3;
if (len && end == 1) {