Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


I've created a second (very little too) patch to reduce the scope of a
variable.
From 7c434fd7af9892fee7b120e00a135d01693265af Mon Sep 17 00:00:00 2001
From: Andreu Correa Casablanca <castarco@gmail.com>
Date: Sun, 11 Sep 2011 22:01:10 +0200
Subject: [PATCH] Reduced the scope of a variable in core/sal/osl/w32/file_dirvol.cxx

---
 sal/osl/w32/file_dirvol.cxx |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index b6dc002..e5852eb 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -60,7 +60,6 @@ extern "C" BOOL TimeValueToFileTime(const TimeValue *cpTimeVal, FILETIME *pFTime
     SYSTEMTIME  BaseSysTime;
     FILETIME    BaseFileTime;
     FILETIME    FTime;
-    __int64     localTime;
     BOOL        fSuccess = FALSE;
 
     BaseSysTime.wYear         = 1970;
@@ -77,7 +76,9 @@ extern "C" BOOL TimeValueToFileTime(const TimeValue *cpTimeVal, FILETIME *pFTime
 
     if ( SystemTimeToFileTime(&BaseSysTime, &BaseFileTime) )
     {
+        __int64 localTime;
         __int64 timeValue;
+
         localTime=cpTimeVal->Seconds*(__int64)10000000+cpTimeVal->Nanosec/100;
         *(__int64 *)&FTime=localTime;
         fSuccess = 0 <= (timeValue= *((__int64 *)&BaseFileTime) + *((__int64 *) &FTime));
-- 
1.7.4.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.