summaryrefslogtreecommitdiff
path: root/usr.bin/lex
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-10-15 05:57:10 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-10-15 05:57:10 +0000
commit61a63a072ce534dc895da11f0126b1b6561f26ed (patch)
treedd8feffeda96eaac4da40c6816b05a7dc0fa6f31 /usr.bin/lex
parente58f1ee36f0f200edcc782f90e25ce2c726842c7 (diff)
Cast arguments of ctype functions to Char, a lexism defined as unsigned
char. Part of a larger attempt to audit ctype function argument types with Coccinelle. ok deraadt@
Diffstat (limited to 'usr.bin/lex')
-rw-r--r--usr.bin/lex/misc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/lex/misc.c b/usr.bin/lex/misc.c
index dd17465a551..40797f57448 100644
--- a/usr.bin/lex/misc.c
+++ b/usr.bin/lex/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.13 2013/10/27 18:31:24 guenther Exp $ */
+/* $OpenBSD: misc.c,v 1.14 2015/10/15 05:57:09 mmcc Exp $ */
/* misc - miscellaneous flex routines */
@@ -33,7 +33,7 @@
* PURPOSE.
*/
-/* $Header: /cvs/OpenBSD/src/usr.bin/lex/misc.c,v 1.13 2013/10/27 18:31:24 guenther Exp $ */
+/* $Header: /cvs/OpenBSD/src/usr.bin/lex/misc.c,v 1.14 2015/10/15 05:57:09 mmcc Exp $ */
#include "flexdef.h"
@@ -109,7 +109,7 @@ char *str;
{
while ( *str )
{
- if ( ! isascii( (Char) *str ) || ! islower( *str ) )
+ if ( ! isascii( (Char) *str ) || ! islower( (Char) *str ) )
return 0;
++str;
}
@@ -125,7 +125,7 @@ char *str;
{
while ( *str )
{
- if ( ! isascii( (Char) *str ) || ! isupper( *str ) )
+ if ( ! isascii( (Char) *str ) || ! isupper( (Char) *str ) )
return 0;
++str;
}
@@ -590,7 +590,7 @@ Char array[];
int sptr = 2;
while ( isascii( array[sptr] ) &&
- isxdigit( (char) array[sptr] ) )
+ isxdigit( array[sptr] ) )
/* Don't increment inside loop control
* because if isdigit() is a macro it might
* expand into multiple increments ...