WaE: return value of fwrite unchecked

Change-Id: Ib3713290a7dcd4bbbb58232d144e35694653a4a5
This commit is contained in:
Caolán McNamara 2012-05-24 16:36:54 +01:00
parent 268ddf9675
commit cf9b0830c5

View file

@ -145,20 +145,20 @@ sal_Bool Append(FILE * fDest, const rtl::OString &rTmpFile)
fclose( fSource );
return sal_False;
}
else
bool bSuccess = true;
char szBuf[ MAX_BUF ];
size_t nItems;
do //appemd
{
char szBuf[ MAX_BUF ];
int nItems;
nItems = fread( szBuf, 1, MAX_BUF, fSource );
bSuccess = (nItems == fwrite(szBuf, 1, nItems, fDest));
SAL_WARN_IF(!bSuccess, "rsc", "short write");
} while (MAX_BUF == nItems && bSuccess);
do //appemd
{
nItems = fread( szBuf, sizeof( char ), MAX_BUF, fSource );
fwrite( szBuf, sizeof( char ), nItems, fDest );
} while( MAX_BUF == nItems );
fclose( fSource );
};
return sal_True;
fclose( fSource );
return bSuccess;
}
sal_Bool Append(const rtl::OString &rOutputSrs, const rtl::OString &rTmpFile)