From 3ea211fab8ed2ffa019fff3fa2468b026610a949 Mon Sep 17 00:00:00 2001 From: Jan Rybar Date: Wed, 28 Sep 2022 07:57:03 +0000 Subject: [PATCH] free: --si changes base of default output --- src/free.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/free.c b/src/free.c index 3e3f23e1..73405dd3 100644 --- a/src/free.c +++ b/src/free.c @@ -123,7 +123,7 @@ static const char *scale_size(unsigned long size, int flags, struct commandline_ switch (args.exponent) { case 0: /* default output */ - snprintf(buf, sizeof(buf), "%ld", size); + snprintf(buf, sizeof(buf), "%ld", (long int)(bytes / (long long int)base)); return buf; case 1: /* in bytes, which can not be in SI */