summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/inp.c
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/patch/inp.c
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/patch/inp.c')
-rw-r--r--usr.bin/patch/inp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c
index eed1aefad68..67cc3a83d72 100644
--- a/usr.bin/patch/inp.c
+++ b/usr.bin/patch/inp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inp.c,v 1.36 2012/04/10 14:46:34 ajacoutot Exp $ */
+/* $OpenBSD: inp.c,v 1.37 2013/11/26 13:19:07 deraadt Exp $ */
/*
* patch - a program to apply diffs to original files
@@ -461,11 +461,12 @@ rev_in_string(const char *string)
if (revision == NULL)
return true;
patlen = strlen(revision);
- if (strnEQ(string, revision, patlen) && isspace(string[patlen]))
+ if (strnEQ(string, revision, patlen) &&
+ isspace((unsigned char)string[patlen]))
return true;
for (s = string; *s; s++) {
- if (isspace(*s) && strnEQ(s + 1, revision, patlen) &&
- isspace(s[patlen + 1])) {
+ if (isspace((unsigned char)*s) && strnEQ(s + 1, revision, patlen) &&
+ isspace((unsigned char)s[patlen + 1])) {
return true;
}
}