[Libreoffice-commits] .: vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Sun Dec 5 05:22:14 PST 2010


 vcl/unx/source/fontmanager/helper.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 06e0790b7dbf6d50a7b74a07ff5ab118379a1f00
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Dec 5 13:22:02 2010 +0000

    cppcheck: can reduce the scope of this variable

diff --git a/vcl/unx/source/fontmanager/helper.cxx b/vcl/unx/source/fontmanager/helper.cxx
index 1559984..88ff842 100644
--- a/vcl/unx/source/fontmanager/helper.cxx
+++ b/vcl/unx/source/fontmanager/helper.cxx
@@ -277,11 +277,11 @@ bool psp::convertPfbToPfa( ::osl::File& rInFile, ::osl::File& rOutFile )
         if( buffer[0] != 0x80 ) // test for pfb m_agic number
         {
             // this migt be a pfa font already
-            sal_uInt64 nWrite = 0;
             if( ! rInFile.read( buffer+6, 9, nRead ) && nRead == 9 &&
                 ( ! std::strncmp( (char*)buffer, "%!FontType1-", 12 ) ||
                   ! std::strncmp( (char*)buffer, "%!PS-AdobeFont-", 15 ) ) )
             {
+                sal_uInt64 nWrite = 0;
                 if( rOutFile.write( buffer, 15, nWrite ) || nWrite != 15 )
                     bSuccess = false;
                 while( bSuccess &&


More information about the Libreoffice-commits mailing list