* dir.c (sort_size): Avoid any arithmetic except comparison on
file sizes - they may not fit "int" that the function returns. Original patch by Bulia Byak <bulia@dr.com>
Этот коммит содержится в:
родитель
e015c70198
Коммит
8f02c8ee72
@ -1,3 +1,9 @@
|
||||
2003-01-20 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* dir.c (sort_size): Avoid any arithmetic except comparison on
|
||||
file sizes - they may not fit "int" that the function returns.
|
||||
Original patch by Bulia Byak <bulia@dr.com>
|
||||
|
||||
2003-01-20 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
* profile.c (load): Handle corrupted section header.
|
||||
|
@ -220,10 +220,10 @@ sort_size (const file_entry *a, const file_entry *b)
|
||||
int ad = MY_ISDIR (a);
|
||||
int bd = MY_ISDIR (b);
|
||||
|
||||
if (ad == bd || mix_all_files)
|
||||
return (b->buf.st_size - a->buf.st_size) * reverse;
|
||||
else
|
||||
return bd-ad;
|
||||
if (ad != bd && !mix_all_files)
|
||||
return bd - ad;
|
||||
|
||||
return (2 * (b->buf.st_size > a->buf.st_size) - 1) * reverse;
|
||||
}
|
||||
|
||||
int
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user