Re: "show directory sizes" gives wrong values - PATCH
- From: Pavel Roskin <proski gnu org>
- To: bulia byak <bulia dr com>
- Cc: mc gnome org
- Subject: Re: "show directory sizes" gives wrong values - PATCH
- Date: Mon, 20 Jan 2003 12:09:53 -0500 (EST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]