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 18:14:09 +00:00
parent dbd4bd2915
commit 037a1c83c4
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: pl_4.c,v 1.4 2009/10/27 23:59:27 deraadt Exp $ */
/* $OpenBSD: pl_4.c,v 1.5 2015/10/24 18:14:09 mmcc Exp $ */
/* $NetBSD: pl_4.c,v 1.4 1995/04/24 12:25:17 cgd Exp $ */
/*
@ -84,7 +84,7 @@ lookout()
sgetstr("What ship? ", buf, sizeof buf);
foreachship(sp) {
c = *countryname[sp->nationality];
if ((c == *buf || tolower(c) == *buf || colours(sp) == *buf)
if ((c == *buf || tolower((unsigned char)c) == *buf || colours(sp) == *buf)
&& (sp->file->stern == buf[1] || sterncolour(sp) == buf[1]
|| buf[1] == '?')) {
eyeball(sp);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: pl_5.c,v 1.6 2009/10/27 23:59:27 deraadt Exp $ */
/* $OpenBSD: pl_5.c,v 1.7 2015/10/24 18:14:09 mmcc Exp $ */
/* $NetBSD: pl_5.c,v 1.4 1995/04/24 12:25:21 cgd Exp $ */
/*
@ -106,7 +106,7 @@ acceptmove()
*p-- = '\0';
break;
default:
if (!isspace(*p)) {
if (!isspace((unsigned char)*p)) {
Msg("Input error.");
*p-- = '\0';
}
@ -202,7 +202,7 @@ parties(crew, to, isdefense, buf)
for (k = 0; k < 3; k++)
temp[k] = crew[k];
if (isdigit(buf)) {
if (isdigit((unsigned char)buf)) {
ptr = isdefense ? to->file->DBP : to->file->OBP;
for (j = 0; j < NBP && ptr[j].turnsent; j++)
;