From: mmcc Date: Sat, 24 Oct 2015 17:43:28 +0000 (+0000) Subject: Cast ctype functions' arguments to unsigned char. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8a7637b1dd643b76eab06c3297b6e08c29dd953d;p=openbsd Cast ctype functions' arguments to unsigned char. ok guenther@ --- diff --git a/games/hack/makedefs.c b/games/hack/makedefs.c index 44d117efee1..af1c25a909f 100644 --- a/games/hack/makedefs.c +++ b/games/hack/makedefs.c @@ -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); }