summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-22 10:02:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-22 13:33:46 +0100
commitdf2e78f1a8a1dc628eb26c8173ba1f6bae0ca6f4 (patch)
tree6aaf6d2f2613c3de773e3d3134b0d1354e0d0b12 /emfio
parent2161d04688be77112c281a1ada5263b963677c43 (diff)
replace check of eof and GetError with good
Change-Id: I7d9f04262ab5420e9a14813fa1274bb9d01e3291 Reviewed-on: https://gerrit.libreoffice.org/45076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/wmfreader.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 9f13b78db0c2..6599e54f8b17 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -1362,13 +1362,11 @@ namespace emfio
mnCurrentAction++;
mpInputStream->ReadUInt32(mnRecSize).ReadUInt16( nFunction );
- if( mpInputStream->GetError()
- || (mnRecSize < 3 )
- || (mnRecSize == 3
- && nFunction == 0
- )
- || mpInputStream->eof()
- )
+ if (
+ !mpInputStream->good() ||
+ (mnRecSize < 3) ||
+ (mnRecSize == 3 && nFunction == 0)
+ )
{
if( mpInputStream->eof() )
mpInputStream->SetError( SVSTREAM_FILEFORMAT_ERROR );