diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-22 10:02:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-22 13:33:46 +0100 |
commit | df2e78f1a8a1dc628eb26c8173ba1f6bae0ca6f4 (patch) | |
tree | 6aaf6d2f2613c3de773e3d3134b0d1354e0d0b12 /emfio | |
parent | 2161d04688be77112c281a1ada5263b963677c43 (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.cxx | 12 |
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 ); |