From c5f0f81d3d8a43f6adee004c0d0f0fd9e532ea41 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 26 May 2012 13:53:54 +1000 Subject: Reduce code to avoid warning from cppcheck. --- src/UniConversion.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/UniConversion.cxx b/src/UniConversion.cxx index 40ac982c9..ffe67f75c 100644 --- a/src/UniConversion.cxx +++ b/src/UniConversion.cxx @@ -240,11 +240,9 @@ int UTF8Classify(const unsigned char *us, int len) { } else { return UTF8MaskInvalid | 1; } - } else if (*us >= 0xc0) { - // Overlong encoding - return UTF8MaskInvalid | 1; } else { - // Trail byte + // 0xc0 .. 0xc1 is overlong encoding + // 0x80 .. 0xbf is trail byte return UTF8MaskInvalid | 1; } } -- cgit v1.2.3