Fixes for more issues found by cppcheck

This commit is contained in:
Gregory Nutt 2014-11-25 15:26:30 -06:00
parent 846dd0e45d
commit 55bfbed33f
7 changed files with 19 additions and 19 deletions

View file

@ -378,11 +378,11 @@ static void show_size(off_t size)
{
(void)printf("%ld", (long)size);
}
else if (size < 1024)
else if (size < 1024 * 1024)
{
(void)printf("%ldK", (long)size / 1024L);
}
else if (size < 1024 * 1024)
else if (size < 1024 * 1024 * 1024)
{
(void)printf("%ldM", (long)size / (1024L * 1024L));
}