gutf8: Remove dead branch condition

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 <pwithnall@gnome.org>

Helps: #3481
This commit is contained in:
Philip Withnall
2024-10-03 15:46:01 +01:00
parent 36e4bb9872
commit 72384894b8

View File

@@ -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.