diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2016-09-13 15:29:26 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2016-09-13 15:29:26 +0000 |
commit | dfa86613837ed6d60d18e5850d840c286ac8d7b4 (patch) | |
tree | 46667c336892c0e58697a2fcf9e65ea2fa079c4f /usr.bin/spell | |
parent | 3a6aad9457513308b299f95ef5e5b24b0d79c41d (diff) |
Eliminate unnecessary isupper() check before tolower().
Diffstat (limited to 'usr.bin/spell')
-rw-r--r-- | usr.bin/spell/look.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/spell/look.c b/usr.bin/spell/look.c index 5029d3a3404..87e0caa489a 100644 --- a/usr.bin/spell/look.c +++ b/usr.bin/spell/look.c @@ -1,4 +1,4 @@ -/* $OpenBSD: look.c,v 1.6 2016/09/07 19:55:01 millert Exp $ */ +/* $OpenBSD: look.c,v 1.7 2016/09/13 15:29:25 millert Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -162,10 +162,8 @@ compare(u_char *s1, u_char *s2, u_char *back) for (;; ++s1, ++s2) { if (*s2 == '\n' || s2 == back) ch = '\0'; - else if (isupper(*s2)) - ch = tolower(*s2); else - ch = *s2; + ch = tolower(*s2); if (*s1 != ch) return (*s1 - ch); if (ch == '\0') |