Without converting to unsigned long long, the calculation would overflow
when the buffer usage would get higher than around 42 MB. This doesn't
really happen, since the buffer capacity currently is not even close to
that value. However, there's no reason not to fix this.
Change-Id: Ib1a440b08ac01a1996f1542719070271d0936f79
if (r != 0)
return r;
- printf("%s: %u KiB, of which %u used (%u%%)\n", name, BtoKiB(capacity), BtoKiB(usage), 100 * usage / capacity);
+ printf("%s: %u KiB, of which %u used (%llu%%)\n", name, BtoKiB(capacity), BtoKiB(usage), 100LLU * usage / capacity);
return 0;
}