aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-02-24 02:05:07 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-02-24 02:05:07 +1300
commit3ef703f98d1a7b6385ef58b767033735e8989bd6 (patch)
treea115a13274ca6b08e1e71e4bec43702e96248526
parentRefactor print_octets to avoid awkward cast (diff)
downloadwtf8-3ef703f98d1a7b6385ef58b767033735e8989bd6.tar.gz
wtf8-3ef703f98d1a7b6385ef58b767033735e8989bd6.zip
Remove redundant NUL char check
Null won't pass is_utf8_cont anyway by definition, so no sense checking it twice
-rw-r--r--wtf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wtf8.c b/wtf8.c
index b8839ce..e400db9 100644
--- a/wtf8.c
+++ b/wtf8.c
@@ -46,7 +46,7 @@ void print_characters(char *s) {
* Print blanks and increment a counter until we find how long this
* character is
*/
- for (c = 1; s[c] && is_utf8_cont(s[c]); c++)
+ for (c = 1; is_utf8_cont(s[c]); c++)
printf(" ");
/*