summaryrefslogtreecommitdiffstats
path: root/usr.bin/look
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-11-26 13:18:53 +0000
committerderaadt <deraadt@openbsd.org>2013-11-26 13:18:53 +0000
commit6cd4fad2c367a960587b848cba814f7a2ee9280c (patch)
treeedd224b3ecdcb78ffd0ceb225a9885c7ab0f2d15 /usr.bin/look
parentunsigned char cast for ctype; ok guenther (diff)
downloadwireguard-openbsd-6cd4fad2c367a960587b848cba814f7a2ee9280c.tar.xz
wireguard-openbsd-6cd4fad2c367a960587b848cba814f7a2ee9280c.zip
unsigned char casts for ctype
ok krw
Diffstat (limited to 'usr.bin/look')
-rw-r--r--usr.bin/look/look.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/look/look.c b/usr.bin/look/look.c
index cfce46f8e59..293e6527b8c 100644
--- a/usr.bin/look/look.c
+++ b/usr.bin/look/look.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: look.c,v 1.13 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: look.c,v 1.14 2013/11/26 13:19:07 deraadt Exp $ */
/* $NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $ */
/*-
@@ -144,9 +144,9 @@ look(char *string, char *front, char *back)
/* Reformat string to avoid doing it multiple times later. */
for (readp = writep = string; ch = *readp++;) {
if (fflag)
- ch = FOLD(ch);
+ ch = FOLD((unsigned char)ch);
if (dflag)
- ch = DICT(ch);
+ ch = DICT((unsigned char)ch);
if (ch != NO_COMPARE)
*(writep++) = ch;
}
@@ -291,9 +291,9 @@ compare(char *s1, char *s2, char *back)
for (; *s1 && s2 < back && *s2 != '\n'; ++s1, ++s2) {
ch = *s2;
if (fflag)
- ch = FOLD(ch);
+ ch = FOLD((unsigned char)ch);
if (dflag)
- ch = DICT(ch);
+ ch = DICT((unsigned char)ch);
if (ch == NO_COMPARE) {
++s2; /* Ignore character in comparison. */