summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-22 19:35:50 +0000
committermmcc <mmcc@openbsd.org>2015-12-22 19:35:50 +0000
commit0340d4f12f60cf03386c33bc72681af67e2578f5 (patch)
tree18cdcc67549394d55b39b5ecee29999003acc793
parentThe Apple SMC is implemented on a H8S/2117 chip. Communication with the chip (diff)
downloadwireguard-openbsd-0340d4f12f60cf03386c33bc72681af67e2578f5.tar.xz
wireguard-openbsd-0340d4f12f60cf03386c33bc72681af67e2578f5.zip
cast toupper's argument to unsigned char
ok millert@
-rw-r--r--usr.bin/grep/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c
index 574a5d50de7..bda784a0de8 100644
--- a/usr.bin/grep/util.c
+++ b/usr.bin/grep/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.53 2015/12/22 17:07:06 millert Exp $ */
+/* $OpenBSD: util.c,v 1.54 2015/12/22 19:35:50 mmcc Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -588,7 +588,7 @@ grep_cmp(const char *pattern, const char *data, size_t len)
for (i = 0; i < len; i++) {
if (((pattern[i] == data[i]) || (!Fflag && pattern[i] == '.'))
- || (iflag && pattern[i] == toupper(data[i])))
+ || (iflag && pattern[i] == toupper((unsigned char)data[i])))
continue;
return false;
}