From: Jan Rybar Date: Wed, 28 Sep 2022 07:57:03 +0000 (+0000) Subject: free: --si changes base of default output X-Git-Tag: v4.0.1rc2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ea211fab8ed2ffa019fff3fa2468b026610a949;p=procps-ng free: --si changes base of default output --- 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 */