summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-05-14 13:40:12 -0400
committerJakob Kaivo <jkk@ung.org>2019-05-14 13:40:12 -0400
commit3627905c4663029ef7da25503cdf13359c1a4ed0 (patch)
treeef9532c791a0bea16c4952149289f13a9ded8963
parentdedba650e7a2ad7ccc1b8a0a11f012efc90ab6d4 (diff)
remove unnecessary branch if L'\n' == '\n'
-rw-r--r--wc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wc.c b/wc.c
index c11a3f8..60384de 100644
--- a/wc.c
+++ b/wc.c
@@ -84,9 +84,11 @@ int is_space(wint_t c, int flags)
int is_newline(wint_t c, int flags)
{
+ #ifdef __STDC_MB_MIGHT_NEQ_WC__
if (flags & CHARS) {
return c == L'\n';
}
+ #endif
return c == '\n';
}