From dc0cf01fcef8e0d98d3d7437bb9178217c132ed9 Mon Sep 17 00:00:00 2001 From: mmcc Date: Tue, 22 Dec 2015 19:35:51 +0000 Subject: cast toupper's argument to unsigned char ok millert@ --- usr.bin/grep/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') 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; } -- cgit v1.2.3