From 1cd2761d04226b28d08fc7b52fa8f6766f84cc67 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 22 Mar 2021 13:35:16 +0100 Subject: [PATCH] mbrtowc: Remove a redundant condition. * lib/mbrtowc-impl-utf8.h: There is no need to check for c == 0xf4 when !(c < 0xf4), as ten lines earlier c <= 0xf4 was established. --- ChangeLog | 6 ++++++ lib/mbrtowc-impl-utf8.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a261d7ba4f..5428778086 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-03-22 Benno Schulenberg (tiny change) + + mbrtowc: Remove a redundant condition. + * lib/mbrtowc-impl-utf8.h: There is no need to check for c == 0xf4 + when !(c < 0xf4), as ten lines earlier c <= 0xf4 was established. + 2021-03-22 Bruno Haible linkedhash-list: Relicense under LGPLv2+. diff --git a/lib/mbrtowc-impl-utf8.h b/lib/mbrtowc-impl-utf8.h index 4f3bbb31ba..58006d335f 100644 --- a/lib/mbrtowc-impl-utf8.h +++ b/lib/mbrtowc-impl-utf8.h @@ -96,7 +96,7 @@ if ((c2 ^ 0x80) < 0x40 && (c >= 0xf1 || c2 >= 0x90) - && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) + && (c < 0xf4 || (/* c == 0xf4 && */ c2 < 0x90))) { if (m == 2) goto incomplete; -- 2.39.5