[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] mbrtowc: remove a redundant condition
From: |
Benno Schulenberg |
Subject: |
[PATCH] mbrtowc: remove a redundant condition |
Date: |
Sun, 21 Mar 2021 17:28:49 +0100 |
* 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 76ea9c3eb..d2dfe5e0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-03-21 Benno Schulenberg <bensberg@telfort.nl> (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-21 Bruno Haible <bruno@clisp.org>
doc: More updates.
diff --git a/lib/mbrtowc-impl-utf8.h b/lib/mbrtowc-impl-utf8.h
index 4f3bbb31b..38cecfcc5 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 || c2 < 0x90))
{
if (m == 2)
goto incomplete;
--
2.29.3
- [PATCH] mbrtowc: remove a redundant condition,
Benno Schulenberg <=