From 4d16fe39ab5cb1d1afc3e1c7dcf244ea520efa0d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 2 Mar 2004 01:31:58 +0000 Subject: [PATCH] Removed useless #ifdef SIZEOF_LONG_LONG. --- files/dos_fs.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/files/dos_fs.c b/files/dos_fs.c index 2492adcdbfc..7c4ebbdd66e 100644 --- a/files/dos_fs.c +++ b/files/dos_fs.c @@ -1535,8 +1535,7 @@ INT WINAPI MulDiv( INT nMultiplier, INT nDivisor) { -#if SIZEOF_LONG_LONG >= 8 - long long ret; + LONGLONG ret; if (!nDivisor) return -1; @@ -1550,30 +1549,12 @@ INT WINAPI MulDiv( /* If the result is positive, we "add" to round. else, we subtract to round. */ if ( ( (nMultiplicand < 0) && (nMultiplier < 0) ) || ( (nMultiplicand >= 0) && (nMultiplier >= 0) ) ) - ret = (((long long)nMultiplicand * nMultiplier) + (nDivisor/2)) / nDivisor; + ret = (((LONGLONG)nMultiplicand * nMultiplier) + (nDivisor/2)) / nDivisor; else - ret = (((long long)nMultiplicand * nMultiplier) - (nDivisor/2)) / nDivisor; + ret = (((LONGLONG)nMultiplicand * nMultiplier) - (nDivisor/2)) / nDivisor; if ((ret > 2147483647) || (ret < -2147483647)) return -1; return ret; -#else - if (!nDivisor) return -1; - - /* We want to deal with a positive divisor to simplify the logic. */ - if (nDivisor < 0) - { - nMultiplicand = - nMultiplicand; - nDivisor = -nDivisor; - } - - /* If the result is positive, we "add" to round. else, we subtract to round. */ - if ( ( (nMultiplicand < 0) && (nMultiplier < 0) ) || - ( (nMultiplicand >= 0) && (nMultiplier >= 0) ) ) - return ((nMultiplicand * nMultiplier) + (nDivisor/2)) / nDivisor; - - return ((nMultiplicand * nMultiplier) - (nDivisor/2)) / nDivisor; - -#endif }