summaryrefslogtreecommitdiff
path: root/utils/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/utf8.c')
-rw-r--r--utils/utf8.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/utils/utf8.c b/utils/utf8.c
index 6c06c76f5..56a1dab3a 100644
--- a/utils/utf8.c
+++ b/utils/utf8.c
@@ -172,8 +172,7 @@ size_t utf8_prev(const char *s, size_t o)
{
assert(s != NULL);
- while (o != 0 && !(((s[--o] & 0x80) == 0x00) ||
- ((s[o] & 0xC0) == 0xC0)))
+ while (o != 0 && (s[--o] & 0xC0) == 0x80)
/* do nothing */;
return o;
@@ -191,8 +190,7 @@ size_t utf8_next(const char *s, size_t l, size_t o)
{
assert(s != NULL);
- while (o != l && !(((s[++o] & 0x80) == 0x00) ||
- ((s[o] & 0xC0) == 0xC0)))
+ while (o != l && (s[++o] & 0xC0) == 0x80)
/* do nothing */;
return o;