mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Remove intermediary cast.
This commit is contained in:
parent
cbbc2ff512
commit
b7b86a22fb
@ -1,3 +1,8 @@
|
||||
2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* utils.c (human_readable): Remove intermediary cast to long; MSVC
|
||||
has problems casting *unsigned* __int64 to double.
|
||||
|
||||
2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
|
||||
|
||||
* sysdep.h: Use the system-provided fnmatch by default.
|
||||
|
@ -1317,10 +1317,7 @@ human_readable (HR_NUMTYPE n)
|
||||
*this* power. */
|
||||
if ((n / 1024) < 1024 || i == countof (powers) - 1)
|
||||
{
|
||||
/* Must cast to long first because MS VC can't directly cast
|
||||
__int64 to double. (This is safe because N is known to
|
||||
be < 1024^2, so always fits into long.) */
|
||||
double val = (double) (long) n / 1024.0;
|
||||
double val = n / 1024.0;
|
||||
/* Print values smaller than 10 with one decimal digits, and
|
||||
others without any decimals. */
|
||||
snprintf (buf, sizeof (buf), "%.*f%c",
|
||||
|
Loading…
Reference in New Issue
Block a user