summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-22 19:35:51 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-22 19:35:51 +0000
commitdc0cf01fcef8e0d98d3d7437bb9178217c132ed9 (patch)
treeeece615813cf2a5bc9af56395e301ae6973ee10d /usr.bin
parent7999b8ab7802507b0b33e61b2dd79097f5a2cd05 (diff)
cast toupper's argument to unsigned char
ok millert@
Diffstat (limited to 'usr.bin')
-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;
}