From 72384894b890dc2a45a0ced8c09162cac1c6b1ee Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 3 Oct 2024 15:46:01 +0100 Subject: [PATCH] gutf8: Remove dead branch condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This arm of the condition is always true, because 0x00 has been checked in the previous branch. This is not going to improve performance, but does mean we now have full branch coverage of the code via our unit tests, which gives some assurance that it’s all good. Signed-off-by: Philip Withnall Helps: #3481 --- glib/gutf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gutf8.c b/glib/gutf8.c index 2e43dc044..51e01a020 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -1690,7 +1690,7 @@ utf8_verify (const char **strp, if (b == 0x00) goto out; - else if (b >= 0x01 && b <= 0x7F) + else if (b <= 0x7F) { /* * Special-case and optimize the ASCII case.