"show directory sizes" gives wrong values - PATCH
Pavel Roskin
proski at gnu.org
Mon Jan 20 17:09:53 UTC 2003
Hello!
> Indeed there was an error in sort_size function: it is declared as int,
> but it returns a value of the type off_t which may be double. This
> results in a casting error and wrong sorting for very big files. The
> patch is attached.
Thank you for figuring it out!
I have never heard of the systems where off_t is a double. off_t is
usually long or "long long".
While at that, I think we should also be concerned about the case when
off_t is unsigned long long, in which case multiplying it by "reverse" (1
or -1) would make no difference. I've applied a cleaner patch.
Nitpicking: please respect the existing formatting and don't overuse the
"?:" operator if you want your patches to be applied without changes and
under your name.
--
Regards,
Pavel Roskin
More information about the mc
mailing list