1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Cast ctype functions' arguments to unsigned char.

ok guenther@
This commit is contained in:
mmcc 2015-10-24 17:43:28 +00:00
parent 8a97e63eab
commit 8a7637b1dd

View File

@ -1,4 +1,4 @@
/* $OpenBSD: makedefs.c,v 1.7 2009/10/27 23:59:25 deraadt Exp $ */
/* $OpenBSD: makedefs.c,v 1.8 2015/10/24 17:43:28 mmcc Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@ -203,12 +203,12 @@ getentry()
while(1) {
ch = nextchar();
swi:
if(isalpha(ch)){
if(isalpha((unsigned char)ch)){
ip = identif;
do {
if(ip < identif+NSZ-1) *ip++ = ch;
ch = nextchar();
} while(isalpha(ch) || isdigit(ch));
} while(isalpha((unsigned char)ch) || isdigit((unsigned char)ch));
*ip = 0;
while(ch == ' ' || ch == '\t') ch = nextchar();
if(ch == '(' && !inparens && !stringseen)
@ -294,5 +294,5 @@ getentry()
void
capitalize(char *sp)
{
*sp = (char)toupper(*sp);
*sp = (char)toupper((unsigned char)*sp);
}