From 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 22 Nov 2017 09:33:32 +0200 Subject: loplugin:simplifybool for negation of comparison operator Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins Reviewed-by: Noel Grandin --- io/source/stm/odata.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'io') diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx index f25dd8dbbdb2..bfd6a92a20a7 100644 --- a/io/source/stm/odata.cxx +++ b/io/source/stm/odata.cxx @@ -284,13 +284,13 @@ OUString ODataInputStream::readUTF() case 12: case 13: // 110x xxxx 10xx xxxx nCount += 2; - if( ! ( nCount <= nUTFLen ) ) + if( nCount > nUTFLen ) { throw WrongFormatException( ); } char2 = (sal_uInt8)readByte(); - if( ! ( (char2 & 0xC0) == 0x80 ) ) + if( (char2 & 0xC0) != 0x80 ) { throw WrongFormatException( ); } @@ -301,7 +301,7 @@ OUString ODataInputStream::readUTF() case 14: // 1110 xxxx 10xx xxxx 10xx xxxx nCount += 3; - if( !( nCount <= nUTFLen) ) + if( nCount > nUTFLen ) { throw WrongFormatException( ); } -- cgit v1.2.3