diff options
author | 2015-11-14 20:13:29 +0000 | |
---|---|---|
committer | 2015-11-14 20:13:29 +0000 | |
commit | dd36fa6f364f8d09fee7c3b5bcac3af57a1f9d66 (patch) | |
tree | bda15d71d027e4f89f20255670bbdb92c0feb737 | |
parent | Betting pledge "stdio rpath wpath cpath" works for this. Let's get it into (diff) | |
download | wireguard-openbsd-dd36fa6f364f8d09fee7c3b5bcac3af57a1f9d66.tar.xz wireguard-openbsd-dd36fa6f364f8d09fee7c3b5bcac3af57a1f9d66.zip |
Correct check flipped in earlier commit.
Eliminate unnecessary isupper() tests before tolower() use
ok millert@
-rw-r--r-- | usr.bin/less/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/less/main.c b/usr.bin/less/main.c index abea6389442..6c35776c99f 100644 --- a/usr.bin/less/main.c +++ b/usr.bin/less/main.c @@ -350,13 +350,12 @@ sprefix(char *ps, char *s, int uppercase) for (; *s != '\0'; s++, ps++) { c = *ps; if (uppercase) { - if (len == 0 && isupper(c)) + if (len == 0 && islower(c)) return (-1); - if (isupper(c)) - c = tolower(c); + c = tolower(c); } sc = *s; - if (len > 0 && isupper(sc)) + if (len > 0) sc = tolower(sc); if (c != sc) break; |