Show sizes > 4G correctly in bytes on 32-bit machines.
size is a long; this needs to be a 64-bit multiplication.
This commit is contained in:
parent
06dc80d3b3
commit
ecc265492f
2
free.c
2
free.c
@ -121,7 +121,7 @@ static const char *scale_size(unsigned long size, int flags, struct commandline_
|
|||||||
if (!(flags & FREE_HUMANREADABLE)) {
|
if (!(flags & FREE_HUMANREADABLE)) {
|
||||||
if (args.exponent == 1) {
|
if (args.exponent == 1) {
|
||||||
/* in bytes, which can not be in SI */
|
/* in bytes, which can not be in SI */
|
||||||
snprintf(buf, sizeof(buf), "%lld", (long long int)(size * 1024));
|
snprintf(buf, sizeof(buf), "%lld", ((long long int)size) * 1024);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
if (args.exponent == 2) {
|
if (args.exponent == 2) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user