diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-21 13:14:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-22 10:17:52 +0100 |
commit | f921ca3cc59825745b1eac52499d72ef8bfa1db5 (patch) | |
tree | 9b77753ca2dd6d83b613ae0fb7c800fc7c110cb6 /basic | |
parent | 0f93062d431d3b110a13e84b0ae65401de377d73 (diff) |
check return of osl_setFilePos
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/iosys.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 6f3af60aedd5..a1d9ff0b1ebc 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -377,10 +377,12 @@ sal_uIntPtr OslStream::PutData( const void* pData, sal_uIntPtr nSize ) sal_uIntPtr OslStream::SeekPos( sal_uIntPtr nPos ) { + ::osl::FileBase::RC rc = ::osl::FileBase::E_None; if( nPos == STREAM_SEEK_TO_END ) - maFile.setPos( osl_Pos_End, 0 ); + rc = maFile.setPos( osl_Pos_End, 0 ); else - maFile.setPos( osl_Pos_Absolut, (sal_uInt64)nPos ); + rc = maFile.setPos( osl_Pos_Absolut, (sal_uInt64)nPos ); + OSL_ENSURE(rc == ::osl::FileBase::E_None, "bad seek"); sal_uInt64 nRealPos(0); maFile.getPos( nRealPos ); return sal::static_int_cast<sal_uIntPtr>(nRealPos); |